Skip to content

Commit

Permalink
fix(general): ecran blanc si rpg 2022 chargé avant màj
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Sep 26, 2024
1 parent 47c0023 commit bc681f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,14 @@ function app() {
}

// Chargement des couches par defaut dans le localStorage
// En premier lieu : on ne garde que les layers bien présents dans l'appli (peut arriver lors d'un màj si on supprime ou remplace une couche)
const newLayersDisplayed = [];
Globals.layersDisplayed.forEach( (layer) => {
if ((layer.id in LayersConfig.thematicLayerSources) || (layer.id in LayersConfig.baseLayerSources)) {
newLayersDisplayed.push(layer);
}
});
Globals.layersDisplayed = newLayersDisplayed;
Globals.manager = new LayerManager({
layers : Globals.layersDisplayed,
});
Expand Down

0 comments on commit bc681f4

Please sign in to comment.