fix: handle undefined shortcuts for users with persisted state

Users with existing persisted state won't have the new terminal
shortcuts, so guard against undefined values.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
SuperComboGamer
2025-12-13 01:29:39 -05:00
parent 2ebb650609
commit a2bd1b593b

View File

@@ -352,7 +352,8 @@ export function TerminalView() {
const cmdOrCtrl = isMac ? e.metaKey : e.ctrlKey;
// Parse shortcut string to check for match
const matchesShortcut = (shortcutStr: string) => {
const matchesShortcut = (shortcutStr: string | undefined) => {
if (!shortcutStr) return false;
const parts = shortcutStr.toLowerCase().split('+');
const key = parts[parts.length - 1];
const needsCmd = parts.includes('cmd');