Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
James Meyer authored and Coop56 committed Dec 13, 2018
1 parent 85d2a1e commit c2a2dfa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/state/configSvc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ function newConfigSvc(layerOptionsSvc, appConfig) {
return sources;
};

svc.defaultBasemap = window.mapstory.composer.config.baselayersConfig.defaultLayer;

svc.defaultBasemap = "";
const sourcesObject = {};
window.mapstory.composer.config.baselayersConfig.layers = window.mapstory.composer.config.baselayersConfig.layers.filter(layer => layer.name !== null);
const sourcesArray = createSources(sourcesObject, window.mapstory.composer.config.baselayersConfig.layers);
const basemaps = createBasemaps(window.mapstory.composer.config.baselayersConfig.layers, sourcesArray);
let sourcesArray = [];
let basemaps = [];
if (window.mapstory.composer.config.baselayersConfig) {
window.mapstory.composer.config.baselayersConfig.layers = window.mapstory.composer.config.baselayersConfig.layers.filter(layer => layer.name !== null);
sourcesArray = createSources(sourcesObject, window.mapstory.composer.config.baselayersConfig.layers);
basemaps = createBasemaps(window.mapstory.composer.config.baselayersConfig.layers, sourcesArray);
svc.defaultBasemap = window.mapstory.composer.config.baselayersConfig.defaultLayer;
}

svc.getBasemapArrayWithActiveBasemap = layers => {
let activeBasemap = null;
Expand Down

0 comments on commit c2a2dfa

Please sign in to comment.