Use proper selector to select share checkboxes

This commit is contained in:
Andreas Nedbal 2022-01-04 18:45:16 +01:00 committed by Andreas Nedbal
parent 44b5e3e6a4
commit 99c74e8418
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ export function questionAnswerHandler(event: Event): void {
document.querySelector<HTMLInputElement>('textarea#q-answer-text').readOnly = true;
const shareTo = [];
Array.from(document.querySelectorAll(`input[type=checkbox][name=share][data-q-id=${questionId}]:checked`))
Array.from(document.querySelectorAll(`input[type=checkbox][name=share][data-q-id="${questionId}"]:checked`))
.forEach((element: HTMLInputElement) => {
shareTo.push(element.dataset.service);
});