Skip to content

Commit 7acda7f

Browse files
authored
Merge pull request #863 from live-codes/fix-command-menu
fix command menu hotkey
2 parents 708bf08 + 0c25761 commit 7acda7f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/livecodes/core.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2835,11 +2835,10 @@ const handleCommandMenu = async () => {
28352835
setTimeout(async () => {
28362836
if (anotherShortcut) return;
28372837
// eslint-disable-next-line no-underscore-dangle
2838-
if (ninja.__visible == null) {
2839-
await loadNinjaKeys();
2838+
if (ninja?.__visible === false || ninja?.data?.length === 0) {
2839+
ninja.focus();
2840+
requestAnimationFrame(() => openCommandMenu());
28402841
}
2841-
ninja.focus();
2842-
requestAnimationFrame(() => openCommandMenu());
28432842
}, 500);
28442843
};
28452844

0 commit comments

Comments
 (0)