mirror of https://github.com/fantasticit/think.git
tiptap: fix get isEditable
This commit is contained in:
parent
8d1a967bad
commit
344cc5b05c
|
@ -45,7 +45,7 @@ import { Table } from './menus/table';
|
||||||
import { Mind } from './menus/mind';
|
import { Mind } from './menus/mind';
|
||||||
|
|
||||||
const _MenuBar: React.FC<{ editor: Editor }> = ({ editor }) => {
|
const _MenuBar: React.FC<{ editor: Editor }> = ({ editor }) => {
|
||||||
const isEditable = useMemo(() => editor.isEditable, [editor]);
|
const isEditable = useMemo(() => editor && editor.isEditable, [editor]);
|
||||||
|
|
||||||
if (!editor) return null;
|
if (!editor) return null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue