From a3b6712bcc08df50a6a221d8d17e80a33e8503ed Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sun, 3 Nov 2024 12:34:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A6=96=E6=AC=A1=E8=BF=9B=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=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 9df772c..044a5cd 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)!; + const before = this.keyMap.get(data?.key ?? KeyCode.Unknown)!; deleteWith(before, data); this.ensureMap(key); const after = this.keyMap.get(key)!;