[XSS] Fixed choice manager UI bug (thanks barbaz for report).

This commit is contained in:
hackademix 2021-01-25 21:25:38 +01:00
parent 4f0885aff9
commit 4afa2a7435
1 changed files with 2 additions and 2 deletions

View File

@ -174,9 +174,9 @@ var UI = (() => {
} }
button.onclick = () => { button.onclick = () => {
let xssUserChoices = UI.xssUserChoices; let xssUserChoices = UI.xssUserChoices;
for (let o of list.selectedOptions) { for (let o of [...list.selectedOptions]) {
delete xssUserChoices[o.value]; delete xssUserChoices[o.value];
list.remove(o); o.remove();
} }
if (list.options.length === 0) { if (list.options.length === 0) {
choicesUI.classList.remove("populated"); choicesUI.classList.remove("populated");