Skip to content

Commit

Permalink
修复表格组件中对selectTablePath的可选链处理
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Dec 19, 2024
1 parent 4029462 commit f17ee40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MarkdownEditor/editor/elements/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down

0 comments on commit f17ee40

Please sign in to comment.