Difference between revisions of "Widget:DCTList"
From LINKS Community Center
Line 401: | Line 401: | ||
// If filterState has a category but subfunctions array is empty, we only care about the category. | // If filterState has a category but subfunctions array is empty, we only care about the category. | ||
− | const emptyCategories = Array.from(filterState.functions) | + | const emptyCategories = [], nonemptyCategories = []; |
− | + | Array.from(filterState.functions).forEach(([key, subs]) => { | |
− | + | if (subs.length > 0) { nonemptyCategories.push(key); } else { emptyCategories.push(key); } | |
+ | }); | ||
− | console.log(emptyCategories) | + | console.log(emptyCategories, nonemptyCategories) |
return true | return true | ||
Revision as of 18:16, 18 November 2022
Development verstion of the DCT List.
Not ready for production!