From fdab424f8b69e3b92558a296859bb8765dc27777 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sun, 3 Nov 2024 13:19:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8C=89=E9=94=AE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/main/custom/hotkey.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)!;