Merge pull request #5555 from quincylvania/walkthrough-crash-fix

Fixes an issue where the walkthrough would not display and cause an error
This commit is contained in:
Quincy Morgan
2018-12-04 17:33:52 -08:00
committed by GitHub
+4 -1
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