Skip to content

Commit

Permalink
Fix(Reverse): Corrige la recherche inverse sur les POI
Browse files Browse the repository at this point in the history
  • Loading branch information
lowzonenose committed Nov 13, 2024
1 parent d8dba4e commit 955c66a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Leaflet/Controls/ReverseGeocoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ var ReverseGeocoding = L.Control.extend(/** @lends L.geoportalControl.ReverseGeo
// on récupère la description à afficher dans la liste
var locationDescription = this._fillGeocodedLocationDescription(location);
// on ajoute chaque résutat à la liste
if (locationDescription.length !== 0) {
if (locationDescription && locationDescription.length !== 0) {
this._createReverseGeocodingResultElement(locationDescription, i);
}
}
Expand Down Expand Up @@ -752,7 +752,7 @@ var ReverseGeocoding = L.Control.extend(/** @lends L.geoportalControl.ReverseGeo

case "PositionOfInterest":
locationDescription += attr.toponym;
if (attr.postcode.length === 1) {
if (attr.postcode && attr.postcode.length === 1) {
locationDescription += ", " + attr.postcode[0];
}
locationDescription += " (" + attr.category.join(",") + ")";
Expand Down

0 comments on commit 955c66a

Please sign in to comment.