From 3cb2b8c901713563ac7ff01ebec8cc7fcea2adfa Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 4 Dec 2018 17:29:19 -0800 Subject: [PATCH] Fixes an issue where the walkthrough would not display and cause an error --- modules/ui/intro/intro.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/intro/intro.js b/modules/ui/intro/intro.js index bdc85d23d..dbb737667 100644 --- a/modules/ui/intro/intro.js +++ b/modules/ui/intro/intro.js @@ -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