fix: robust checkbox selection (for loop + explicit checked property)
This commit is contained in:
parent
9186e02083
commit
8275caa87f
1 changed files with 6 additions and 3 deletions
|
|
@ -70,9 +70,12 @@ function loadGroups() {
|
|||
|
||||
function getSelectedTargets(group) {
|
||||
var targets = [];
|
||||
group.querySelectorAll('.target-cb:checked').forEach(function (cb) {
|
||||
targets.push(cb.dataset.domain);
|
||||
});
|
||||
var boxes = group.querySelectorAll('.target-cb');
|
||||
for (var i = 0; i < boxes.length; i++) {
|
||||
if (boxes[i].checked) {
|
||||
targets.push(boxes[i].getAttribute('data-domain'));
|
||||
}
|
||||
}
|
||||
return targets;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue