Skip to content

Commit 4982509

Browse files
committed
Fix TypeScript error with optional withModifier property
Change-Id: If0ba43b175821808ac897cd08e0a82f3af04c91e Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 76c3f38 commit 4982509

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/browser/lib/shortcuts.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,11 @@ export function matchesKey(
253253
const shortcut = SHORTCUTS[shortcutId];
254254

255255
// Check modifier requirement
256-
if (shortcut.withModifier && !(event.metaKey || event.ctrlKey)) {
256+
if (
257+
"withModifier" in shortcut &&
258+
shortcut.withModifier &&
259+
!(event.metaKey || event.ctrlKey)
260+
) {
257261
return false;
258262
}
259263

0 commit comments

Comments
 (0)