From 648b413d044864653ba5475a611165d4967bd91f Mon Sep 17 00:00:00 2001 From: Jacques Fize <4259846+jacquesfize@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:29:58 +0100 Subject: [PATCH] (map component) refactoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Théo Lechémia --- frontend/src/app/GN2CommonModule/map/map.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]);