diff options
-rw-r--r-- | ui.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui.js b/ui.js index 970adbf..99039cf 100644 --- a/ui.js +++ b/ui.js @@ -1432,6 +1432,11 @@ class ContextMenu extends FocusElement { } show({x = 0, y = 0, items}) { + items = items.filter(Boolean) + if (!items.length) { + return + } + // This *should* work with a menu action which opens the menu again, // because the selected element will be restored before the menu is // opened the second time. |