Fix issue where background panel wouldn't update (close #6627)

This commit is contained in:
Quincy Morgan
2019-07-08 16:48:10 -04:00
parent 8003e7b3d3
commit 83c5fa3215

View File

@@ -284,7 +284,9 @@ export function rendererBackground(context) {
background.showsLayer = function(d) {
return d.id === baseLayer.source().id ||
var baseSource = baseLayer.source();
if (!d || !baseSource) return false;
return d.id === baseSource.id ||
_overlayLayers.some(function(layer) { return d.id === layer.source().id; });
};