From 5cafa753bbae6beb882d6be9a89d855a4af2e445 Mon Sep 17 00:00:00 2001 From: Sam Wolfs Date: Mon, 14 Sep 2020 08:55:24 +0200 Subject: [PATCH] Slice hotkey array before (un)pause --- src/lib/hotkeys.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/hotkeys.service.ts b/src/lib/hotkeys.service.ts index 7c14edb..6cf3561 100644 --- a/src/lib/hotkeys.service.ts +++ b/src/lib/hotkeys.service.ts @@ -134,7 +134,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; @@ -151,7 +151,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;