From 3a54ed65356518e54b564f398f9010cf43c084d8 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sun, 3 Nov 2024 13:37:12 +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 | 1 + 1 file changed, 1 insertion(+) 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);