From f17ee4000c9b315ea9432a09387c9938c146f08e Mon Sep 17 00:00:00 2001 From: "qixian.cs" Date: Thu, 19 Dec 2024 11:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E5=AF=B9selectTablePath=E7=9A=84=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E9=93=BE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MarkdownEditor/editor/elements/table.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MarkdownEditor/editor/elements/table.tsx b/src/MarkdownEditor/editor/elements/table.tsx index 1c3fe42..62f1246 100644 --- a/src/MarkdownEditor/editor/elements/table.tsx +++ b/src/MarkdownEditor/editor/elements/table.tsx @@ -184,7 +184,7 @@ export const Table = observer((props: RenderElementProps) => { const isSel = useMemo(() => { if (selected) return true; - if (!store.selectTablePath.length) return false; + if (!store.selectTablePath?.length) return false; return store.selectTablePath.join('') === path.join(''); }, [store.editor, selected, store.selectTablePath, props.element]);