fix: _matchesCombo crashes on non-string keybind from server (#2049)

This commit is contained in:
Afonso Coutinho
2026-07-11 03:15:19 +01:00
committed by GitHub
parent 7b25b6dbdc
commit 667f9e4cae
2 changed files with 48 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ const _defaultKeybinds = {
};
export function _matchesCombo(e, combo, isMac = IS_MAC) {
if (!combo) return false;
if (typeof combo !== 'string' || !combo) return false;
// Drop AltGr keystrokes so typing characters on non-US layouts can't fire a
// Ctrl+Alt shortcut — e.g. the destructive delete_session. See platform.js.
if (isAltGrEvent(e, isMac)) return false;