diff --git a/packages/hurumap-next/src/Map/Layers.js b/packages/hurumap-next/src/Map/Layers.js index 0cf39e485..dd9ba7175 100644 --- a/packages/hurumap-next/src/Map/Layers.js +++ b/packages/hurumap-next/src/Map/Layers.js @@ -75,7 +75,8 @@ function Layers({ const locationCodes = locationCodesProp?.map((c) => c.toUpperCase()) || []; if (!locationCodes?.includes(feature.properties.code.toUpperCase())) { - geoStyles.inactive.color = choropleth[0].color; + geoStyles.inactive.color = + choropleth?.[0]?.color ?? geoStyles.inactive.color; layer.setStyle(geoStyles.inactive); } else { const popUpContent = (level, name) =>