mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-31 15:09:26 +08:00
fix: 首次进游戏报错
This commit is contained in:
parent
bba3cb5e50
commit
a3b6712bcc
@ -200,7 +200,7 @@ export class Hotkey extends EventEmitter<HotkeyEvent> {
|
||||
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)!;
|
||||
|
Loading…
Reference in New Issue
Block a user