diff --git a/frontend/src/app/GN2CommonModule/map/map.component.ts b/frontend/src/app/GN2CommonModule/map/map.component.ts index 147024a250..6b747b1727 100644 --- a/frontend/src/app/GN2CommonModule/map/map.component.ts +++ b/frontend/src/app/GN2CommonModule/map/map.component.ts @@ -219,7 +219,7 @@ export class MapComponent implements OnInit { // Select and add the current tile layer const userMapLayer = localStorage.getItem('MapLayer'); - if (userMapLayer !== null && baseControl[userMapLayer] !== undefined) { + if (userMapLayer && baseControl[userMapLayer]) { this.map.addLayer(baseControl[userMapLayer]); } else { this.map.addLayer(baseControl[BASEMAP[0].name]);