diff --git a/src/lib/hotkeys.service.ts b/src/lib/hotkeys.service.ts index 5942f1e..bba97e5 100644 --- a/src/lib/hotkeys.service.ts +++ b/src/lib/hotkeys.service.ts @@ -139,7 +139,7 @@ export class HotkeysService { } if (Array.isArray(hotkey)) { const temp: Hotkey[] = []; - for (const key of hotkey) { + for (const key of hotkey.slice()) { temp.push(this.pause(key) as Hotkey); } return temp; @@ -156,7 +156,7 @@ export class HotkeysService { } if (Array.isArray(hotkey)) { const temp: Hotkey[] = []; - for (const key of hotkey) { + for (const key of hotkey.slice()) { temp.push(this.unpause(key) as Hotkey); } return temp;