diff --git a/src/core/main/custom/hotkey.ts b/src/core/main/custom/hotkey.ts index 044a5cd..97e6e13 100644 --- a/src/core/main/custom/hotkey.ts +++ b/src/core/main/custom/hotkey.ts @@ -200,7 +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]; - const before = this.keyMap.get(data?.key ?? KeyCode.Unknown)!; + const before = this.keyMap.get(data?.key ?? KeyCode.Unknown)! ?? []; deleteWith(before, data); this.ensureMap(key); const after = this.keyMap.get(key)!;