diff --git a/src/core/main/custom/hotkey.ts b/src/core/main/custom/hotkey.ts index 97e6e13..5ad77eb 100644 --- a/src/core/main/custom/hotkey.ts +++ b/src/core/main/custom/hotkey.ts @@ -200,6 +200,7 @@ export class Hotkey extends EventEmitter { set(id: string, key: KeyCode, assist: number, emit: boolean = true) { const { ctrl, shift, alt } = unwarpBinary(assist); const data = this.data[id]; + if (!data) return; const before = this.keyMap.get(data?.key ?? KeyCode.Unknown)! ?? []; deleteWith(before, data); this.ensureMap(key);