tiptap: fix get isEditable

This commit is contained in:
fantasticit 2022-05-02 16:15:09 +08:00
parent 8d1a967bad
commit 344cc5b05c
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ import { Table } from './menus/table';
import { Mind } from './menus/mind';
const _MenuBar: React.FC<{ editor: Editor }> = ({ editor }) => {
const isEditable = useMemo(() => editor.isEditable, [editor]);
const isEditable = useMemo(() => editor && editor.isEditable, [editor]);
if (!editor) return null;