Use proper selector to select share checkboxes
This commit is contained in:
parent
44b5e3e6a4
commit
99c74e8418
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue