From 347c6702a9db260c7ab39486696dadb47e16ce54 Mon Sep 17 00:00:00 2001 From: Bart Jeukendrup Date: Thu, 24 Nov 2022 21:07:31 +0100 Subject: [PATCH] Correctly filter incidents on map --- .../IncidentMap/components/utils/get-filtered-incidents.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/signals/IncidentMap/components/utils/get-filtered-incidents.ts b/src/signals/IncidentMap/components/utils/get-filtered-incidents.ts index 34810d7a76..72ba592250 100644 --- a/src/signals/IncidentMap/components/utils/get-filtered-incidents.ts +++ b/src/signals/IncidentMap/components/utils/get-filtered-incidents.ts @@ -27,13 +27,13 @@ export const getFilteredIncidents = ( const activeSlugs = activeFilters.map((filter) => filter.slug) const activeIncidents = incidents.filter((incident) => { - return activeSlugs.includes(incident.properties.category.slug) + return activeSlugs.includes(incident.properties.category.parent.slug) }) const listedIcons = getListOfIcons(activeFilters) return activeIncidents.map((incident) => { - const slug = incident.properties.category.slug + const slug = incident.properties.category.parent.slug const icon = listedIcons.find((iconObj) => iconObj.slug === slug) if (icon?.icon) {