Skip to content

Commit 03dd752

Browse files
authored
fix: if there is no table block, there is no table handles to show #1055 (#2281)
1 parent 9009369 commit 03dd752

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/core/src/extensions/TableHandles/TableHandles.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,12 +621,16 @@ export const TableHandlesExtension = createExtension(({ editor }) => {
621621
key: tableHandlesPluginKey,
622622
view: (editorView) => {
623623
view = new TableHandlesView(editor as any, editorView, (state) => {
624-
store.setState({
625-
...state,
626-
draggingState: state.draggingState
627-
? { ...state.draggingState }
624+
store.setState(
625+
state.block
626+
? {
627+
...state,
628+
draggingState: state.draggingState
629+
? { ...state.draggingState }
630+
: undefined,
631+
}
628632
: undefined,
629-
});
633+
);
630634
});
631635
return view;
632636
},

0 commit comments

Comments
 (0)