Skip to content

Commit

Permalink
Merge pull request #1192 from dbauszus-glx/remove-empty-cat-filter
Browse files Browse the repository at this point in the history
Remove empty cat filter from theme legend
  • Loading branch information
dbauszus-glx authored Mar 25, 2024
2 parents aed8af6 + 3c7c029 commit febc162
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui/layers/legends/categorized.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default (layer) => {
// Delete current field filter if NI array is empty.
if (!layer.filter.current[theme.field].ni.length) {
delete layer.filter.current[theme.field].ni
if (!Object.keys(layer.filter.current[theme.field])) {
if (!Object.keys(layer.filter.current[theme.field]).length) {
delete layer.filter.current[theme.field]
}
}
Expand Down

0 comments on commit febc162

Please sign in to comment.