Skip to content

Commit d0ec811

Browse files
committed
Hide null options
1 parent f218699 commit d0ec811

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/Shortcuts.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ const Shortcuts: React.FC = () => {
9797

9898
const shortcutOptions = configs
9999
? Object.entries(DEFAULT_SHORTCUTS).filter(([key]) => {
100-
return configs.shortcuts ? Object.keys(configs.shortcuts).includes(key) : true;
100+
return configs.shortcuts
101+
? Object.keys(configs.shortcuts).includes(key) &&
102+
configs.shortcuts[key as keyof typeof configs.shortcuts]
103+
: true;
101104
})
102105
: Object.entries(DEFAULT_SHORTCUTS);
103106

0 commit comments

Comments
 (0)