Skip to content

Commit 2f857f8

Browse files
committed
fix command menu hotkey
1 parent 708bf08 commit 2f857f8

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/livecodes/core.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2834,12 +2834,10 @@ const handleCommandMenu = async () => {
28342834
anotherShortcut = false;
28352835
setTimeout(async () => {
28362836
if (anotherShortcut) return;
2837-
// eslint-disable-next-line no-underscore-dangle
2838-
if (ninja.__visible == null) {
2839-
await loadNinjaKeys();
2837+
if (ninja.__visible === false || ninja.data.length === 0) {
2838+
ninja.focus();
2839+
requestAnimationFrame(() => openCommandMenu());
28402840
}
2841-
ninja.focus();
2842-
requestAnimationFrame(() => openCommandMenu());
28432841
}, 500);
28442842
};
28452843

0 commit comments

Comments
 (0)