Skip to content

Commit

Permalink
(map component) refactoring
Browse files Browse the repository at this point in the history
Co-authored-by: Théo Lechémia  <theo.lechemia@ecrins-parcnational.fr>
  • Loading branch information
jacquesfize and TheoLechemia committed Mar 18, 2024
1 parent 14cb299 commit 648b413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/app/GN2CommonModule/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 648b413

Please sign in to comment.