diff --git a/src/structures/structures.controller.ts b/src/structures/structures.controller.ts index aec18cd4ff4262e6f207322a2b94224340d87518..d265350888451e401fa0d62eb389055e2b9ccd73 100644 --- a/src/structures/structures.controller.ts +++ b/src/structures/structures.controller.ts @@ -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));