refactor(editor): should not rely on doc collection type (#9501)

This commit is contained in:
Saul-Mirone
2025-01-03 06:30:27 +00:00
parent cb5d7eaabc
commit 897c7d4284
55 changed files with 200 additions and 158 deletions

View File

@@ -7,7 +7,7 @@ import { applyUpdate, encodeStateAsUpdate } from 'yjs';
import { COLLECTION_VERSION, PAGE_VERSION } from '../consts.js';
import type { BlockModel, BlockSchemaType, Doc } from '../index.js';
import { DocCollection, IdGeneratorType, Schema } from '../index.js';
import type { DocMeta } from '../store/index.js';
import type { DocMeta } from '../store/workspace.js';
import type { BlockSuiteDoc } from '../yjs/index.js';
import {
NoteBlockSchema,
@@ -432,7 +432,7 @@ describe('addBlock', () => {
);
let called = false;
collection.meta.docMetaUpdated.on(() => {
collection.slots.docListUpdated.on(() => {
called = true;
});