From a2bd1b593bf0975198975aed2dbedd90b8aae1fc Mon Sep 17 00:00:00 2001 From: SuperComboGamer Date: Sat, 13 Dec 2025 01:29:39 -0500 Subject: [PATCH] fix: handle undefined shortcuts for users with persisted state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/app/src/components/views/terminal-view.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/app/src/components/views/terminal-view.tsx b/apps/app/src/components/views/terminal-view.tsx index eea43135..28325014 100644 --- a/apps/app/src/components/views/terminal-view.tsx +++ b/apps/app/src/components/views/terminal-view.tsx @@ -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');