From 4afa2a7435e161dcb0883e3eb95be34d64921846 Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 25 Jan 2021 21:25:38 +0100 Subject: [PATCH] [XSS] Fixed choice manager UI bug (thanks barbaz for report). --- src/ui/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/ui.js b/src/ui/ui.js index b0e6fd3..aa61a8a 100644 --- a/src/ui/ui.js +++ b/src/ui/ui.js @@ -174,9 +174,9 @@ var UI = (() => { } button.onclick = () => { let xssUserChoices = UI.xssUserChoices; - for (let o of list.selectedOptions) { + for (let o of [...list.selectedOptions]) { delete xssUserChoices[o.value]; - list.remove(o); + o.remove(); } if (list.options.length === 0) { choicesUI.classList.remove("populated");