diff --git a/packages/editor/src/core/hooks/use-editor.ts b/packages/editor/src/core/hooks/use-editor.ts index af970b670a6..23bb5088417 100644 --- a/packages/editor/src/core/hooks/use-editor.ts +++ b/packages/editor/src/core/hooks/use-editor.ts @@ -202,7 +202,7 @@ export const useEditor = (props: CustomEditorProps) => { getDocument: () => { const documentBinary = provider?.document ? Y.encodeStateAsUpdate(provider?.document) : null; const documentHTML = editor?.getHTML() ?? "

"; - const documentJSON = editor.getJSON() ?? null; + const documentJSON = editor?.getJSON() ?? null; return { binary: documentBinary,