MDL-73255 user: Ensure that invalid filters are not left
commit8a126b75e558a3db4e851fe4622647ddfdcc77f5
authorAndrew Nicols <andrew@nicols.co.uk>
Sun, 19 Dec 2021 00:30:17 +0000 (19 08:30 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 23 Dec 2021 03:01:44 +0000 (23 11:01 +0800)
tree45cc6edb5f864108f75ba9fcfcfa0e8cbd5368fe
parent58a729f08871d0bdd4a27fe54327999c9b81dd0e
MDL-73255 user: Ensure that invalid filters are not left

When there is no group but a default groupmode is set, the group
configuration is provided but the group data is not present. This
resulted in a JS error and an invalid filter line was left in place.

This change conditionally checks the data-filter-type-class value of the
filterDataNode so that no JS error is produced if the filterDataNode
does not exist and therefore removes the empty filter row.
user/amd/build/local/participantsfilter/filter.min.js
user/amd/build/local/participantsfilter/filter.min.js.map
user/amd/build/participantsfilter.min.js
user/amd/build/participantsfilter.min.js.map
user/amd/src/local/participantsfilter/filter.js
user/amd/src/participantsfilter.js