Skip to content

Commit 8d4fb2d

Browse files
Fixed slash menu attempting to execute item when there are no items (#368)
1 parent 4ba74b6 commit 8d4fb2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/shared/plugins/suggestion/SuggestionPlugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ export const setupSuggestionsMenu = <
346346

347347
// Selects an item and closes the menu.
348348
if (event.key === "Enter") {
349+
if (items.length === 0) {
350+
return true;
351+
}
352+
349353
deactivate(view);
350354
editor._tiptapEditor
351355
.chain()

0 commit comments

Comments
 (0)