Skip to content

Commit 5b54b34

Browse files
committed
refactor: do not throw error on unneeded fork
1 parent 3e8af82 commit 5b54b34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/editor/BlockNoteEditor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,8 @@ export class BlockNoteEditor<
10081008
const originalFragment = this.options.collaboration?.fragment;
10091009

10101010
if (!originalFragment) {
1011-
throw new Error("No Yjs document found");
1011+
// No original fragment found, so no need to fork
1012+
return;
10121013
}
10131014

10141015
const doc = new Y.Doc();

0 commit comments

Comments
 (0)