Skip to content

Commit

Permalink
aggregation type
Browse files Browse the repository at this point in the history
check if '#aggregation-type-all-select-' + widget_id exist before adding
new option
  • Loading branch information
clavay authored and trombastic committed Sep 14, 2023
1 parent 61cf534 commit 7bb41ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3001,7 +3001,7 @@ function setAggregatedLists() {
b=filter_aggregation_type_for_period_list(a);
for (v in b) {
c[cc].add(new Option(b[v], v));
if (!document.querySelectorAll('#aggregation-type-all-select-' + widget_id + ' option[value="' + v + '"]').length) {
if (document.querySelector('#aggregation-type-all-select-' + widget_id) != null && !document.querySelectorAll('#aggregation-type-all-select-' + widget_id + ' option[value="' + v + '"]').length) {
document.querySelector('#aggregation-type-all-select-' + widget_id).add(new Option(b[v], v));
}
}
Expand Down

0 comments on commit 7bb41ae

Please sign in to comment.