diff --git a/src/components/PropertyMap.tsx b/src/components/PropertyMap.tsx index 29d6ea4d..8c952d69 100644 --- a/src/components/PropertyMap.tsx +++ b/src/components/PropertyMap.tsx @@ -175,22 +175,20 @@ const PropertyMap: FC = ({ const mapFilter = Object.entries(appFilter).reduce( (acc, [property, filterItem]) => { if (filterItem.values.length) { - const useIndexOfFilterFilter: any = ["any"]; + const thisFilterGroup: any = ["any"]; filterItem.values.forEach((item) => { if (filterItem.useIndexOfFilter) { - useIndexOfFilterFilter.push([ + thisFilterGroup.push([ ">=", ["index-of", item, ["get", property]], 0, ]); } else { - acc.push(["in", ["get", property], item]); + thisFilterGroup.push(["in", ["get", property], item]); } }); - if (filterItem.useIndexOfFilter) { - acc.push(useIndexOfFilterFilter); - } + acc.push(thisFilterGroup); } return acc; },