You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the ai-selector.tsx and generative-menu-switch.tsx, the const { editor } = useEditor() object destructuring returns const editor: Editor | null in the new version of tiptap/core + /react + /pm @2.2.4 which was included in the latest version of novel.
The null of editor can lead to ⚠ TS Errors on null.
Screenshots from novel repo clone demo:
We can see the useEditor() returns just editor from tiptap/core + /react + /pm @2.2.2
Another⚠ TS Error in the advanced-editor.tsx from line 95.
It means that we are trying to call a function on an object that might not exist at runtime. It seems like EditorCommandItem might be undefined.
This issue is also coming from the latest version of novel.
The text was updated successfully, but these errors were encountered:
lumpinif
changed the title
⚠ TS Errors on null of editor for lastest version of Novel
⚠ TS Errors need to be fixed on null of editor for lastest version of Novel
Apr 24, 2024
@akdeb I also had to add a bunch of null checks to address the ts errors. However, the wired thing is useEditor() from original package doesn't return null but only Editor
In the ai-selector.tsx and generative-menu-switch.tsx, the
const { editor } = useEditor()
object destructuring returnsconst editor: Editor | null
in the new version of tiptap/core + /react + /pm @2.2.4 which was included in the latest version of novel.The null of editor can lead to ⚠ TS Errors on null.
Screenshots from novel repo clone demo:
We can see the useEditor() returns just editor from tiptap/core + /react + /pm @2.2.2
Another⚠ TS Error in the advanced-editor.tsx from line 95.
It means that we are trying to call a function on an object that might not exist at runtime. It seems like EditorCommandItem might be undefined.
This issue is also coming from the latest version of novel.
The text was updated successfully, but these errors were encountered: