mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
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:
@@ -352,7 +352,8 @@ export function TerminalView() {
|
|||||||
const cmdOrCtrl = isMac ? e.metaKey : e.ctrlKey;
|
const cmdOrCtrl = isMac ? e.metaKey : e.ctrlKey;
|
||||||
|
|
||||||
// Parse shortcut string to check for match
|
// 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 parts = shortcutStr.toLowerCase().split('+');
|
||||||
const key = parts[parts.length - 1];
|
const key = parts[parts.length - 1];
|
||||||
const needsCmd = parts.includes('cmd');
|
const needsCmd = parts.includes('cmd');
|
||||||
|
|||||||
Reference in New Issue
Block a user