refactor(editor): remove assertExists (#10615)

This commit is contained in:
Saul-Mirone committed 2025-03-05 00:13:08 +00:00
1 parent a6692f70aa
commit b8ecfbdae6
106 files changed
+863 -517

No files matched your search

@@ -1,4 +1,3 @@
import { assertExists } from '@blocksuite/global/utils';
import type { DocSource } from '@blocksuite/sync';
import { diffUpdate, encodeStateVectorFromUpdate, mergeUpdates } from 'yjs';
@@ -69,7 +68,9 @@ export class WebSocketDocSource implements DocSource {
}
const latest = this.docMap.get(docId);
assertExists(latest);
if (!latest) {
throw new Error('latest is not found');
}
this.ws.send(
JSON.stringify({
channel: 'doc',