Skip to content

Commit 0fb2f58

Browse files
committed
fix isEnabled in popup
1 parent f704ccc commit 0fb2f58

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/popup/hotkeys.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ const MENU_KEYS = {
1616
ContextMenu: 1,
1717
Enter: 1,
1818
};
19-
const isEnabled = () => togglables[0] && $id(kStyleIdPrefix + togglables[0]).styleMeta.enabled;
19+
const isEnabled = () => {
20+
let el = togglables[0];
21+
if (el && (el.id || (el = $id(kStyleIdPrefix + el))))
22+
return el.styleMeta.enabled;
23+
};
2024
let infoOn;
2125
let menuKey = 0;
2226
let oldBodyStyle;

0 commit comments

Comments
 (0)