From 89c38991b997be66ffb7f205099e20a916bd1e2c Mon Sep 17 00:00:00 2001 From: orangemug Date: Mon, 29 Jan 2018 17:17:55 +0000 Subject: [PATCH] Added guard to sourceLayerIds --- src/components/layers/LayerEditor.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/layers/LayerEditor.jsx b/src/components/layers/LayerEditor.jsx index 1d43bff..47ebe20 100644 --- a/src/components/layers/LayerEditor.jsx +++ b/src/components/layers/LayerEditor.jsx @@ -117,6 +117,11 @@ export default class LayerEditor extends React.Component { comment = this.props.layer.metadata['maputnik:comment'] } + let sourceLayerIds; + if(this.props.sources.hasOwnProperty(this.props.layer.source)) { + sourceLayerIds = this.props.sources[this.props.layer.source].layers; + } + switch(type) { case 'layer': return
} {this.props.layer.type !== 'raster' && this.props.layer.type !== 'background' && this.changeProperty(null, 'source-layer', v)} />