We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66be0b1 commit d2a6307Copy full SHA for d2a6307
packages/editor/src/core/hooks/use-editor.ts
@@ -202,7 +202,7 @@ export const useEditor = (props: CustomEditorProps) => {
202
getDocument: () => {
203
const documentBinary = provider?.document ? Y.encodeStateAsUpdate(provider?.document) : null;
204
const documentHTML = editor?.getHTML() ?? "<p></p>";
205
- const documentJSON = editor.getJSON() ?? null;
+ const documentJSON = editor?.getJSON() ?? null;
206
207
return {
208
binary: documentBinary,
0 commit comments