mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 21:48:48 +08:00
feat(editor): replace slot with rxjs subject (#10768)
This commit is contained in:
@@ -22,9 +22,9 @@ export class SurfaceBlockService extends BlockService {
|
||||
this.surface = surface!;
|
||||
|
||||
if (!this.surface) {
|
||||
const disposable = this.doc.slots.blockUpdated.on(payload => {
|
||||
const disposable = this.doc.slots.blockUpdated.subscribe(payload => {
|
||||
if (payload.flavour === 'affine:surface') {
|
||||
disposable.dispose();
|
||||
disposable.unsubscribe();
|
||||
const surface = this.doc.getBlockById(
|
||||
payload.id
|
||||
) as SurfaceBlockModel | null;
|
||||
|
||||
Reference in New Issue
Block a user