Fixes an issue where the walkthrough would not display and cause an error

This commit is contained in:
Quincy Morgan
2018-12-04 17:29:19 -08:00
parent 99e5fa7eaa
commit 3cb2b8c901

View File

@@ -98,7 +98,10 @@ export function uiIntro(context) {
// Setup data layers (only OSM)
var layers = context.layers();
layers.all().forEach(function(item) {
item.layer.enabled(item.id === 'osm');
// if the layer has the function `enabled`
if (typeof item.layer.enabled == 'function') {
item.layer.enabled(item.id === 'osm');
}
});
// Mock geocoder