diff --git a/.yarn/versions/404a2ee9.yml b/.yarn/versions/404a2ee9.yml new file mode 100644 index 0000000..90948e7 --- /dev/null +++ b/.yarn/versions/404a2ee9.yml @@ -0,0 +1,2 @@ +releases: + "@nytimes/react-prosemirror": patch diff --git a/src/hooks/useEditorEventCallback.ts b/src/hooks/useEditorEventCallback.ts index 1854775..5d1a171 100644 --- a/src/hooks/useEditorEventCallback.ts +++ b/src/hooks/useEditorEventCallback.ts @@ -30,7 +30,10 @@ export function useEditorEventCallback( return useCallback( (...args: T) => { - if (editorView) ref.current(editorView, ...args); + if (editorView) { + return ref.current(editorView, ...args); + } + return; }, [editorView] );