Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.shuffle.filter((element, shuffle) => {
// If there is a current filter applied, ignore elements that don't match it.
if (shuffle.group !== Shuffle.ALL_ITEMS) {
// Get the item's groups.
const groups = element.getAttribute('data-groups');
// remove empty values from filter list
let activeFilters = shuffle.group.filter((el) => el !== '');
// for each active filter, check against element groups
for (i=0; i