From f8d2fdd802b66767d9bc80685ebdac5740bdb8dc Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Mon, 30 Mar 2020 21:34:36 -0400 Subject: Fixed Array.map is not a function --- html/preferences_panel/pref.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'html/preferences_panel') diff --git a/html/preferences_panel/pref.js b/html/preferences_panel/pref.js index debb468..f8d8fdf 100644 --- a/html/preferences_panel/pref.js +++ b/html/preferences_panel/pref.js @@ -139,7 +139,7 @@ }, async swapSelection(list) { let origin = list === Model.lists.black ? "white" : "black"; - await this.addToList(list, ...Array.map( + await this.addToList(list, ...Array.prototype.map.call( document.querySelectorAll(`select#${origin} option:checked`), option => option.value) ); @@ -189,7 +189,7 @@ async deleteSelection() { for (let id of ["black", "white"]) { let selection = document.querySelectorAll(`select#${id} option:checked`); - await Model.lists[id].remove(...Array.map(selection, option => option.value)); + await Model.lists[id].remove(...Array.prototype.map.call(selection, option => option.value)); } this.populateListUI(); this.syncAll(); -- cgit v1.2.3