Skip to content
Snippets Groups Projects
Commit 3b046c8f authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

fix(carto): Cannot read property 'match' of undefined

parent 7a405bfa
Loading
......@@ -77,7 +77,7 @@ export class StructuresController {
) ||
_.deburr(cityPoint.properties.name?.toLowerCase().replace(/\-/g, ' ')) ===
_.deburr(city).toLowerCase().replace(/\-/g, ' ')) &&
cityPoint.properties.postcode.match(depRegex)
cityPoint.properties.postcode?.match(depRegex)
)
)
.then((data) => data.map((filteredCityPoint) => filteredCityPoint.geometry.coordinates));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment