From 68685dcf42aecf50a5ebe6e4f524e5398455969d Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Thu, 12 Jan 2017 13:15:04 +0100 Subject: [PATCH] Only set source layer if not undefined --- src/components/modals/AddModal.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modals/AddModal.jsx b/src/components/modals/AddModal.jsx index eb2dd7b..d08a539 100644 --- a/src/components/modals/AddModal.jsx +++ b/src/components/modals/AddModal.jsx @@ -31,7 +31,7 @@ class AddModal extends React.Component { if(this.state.type !== 'background') { layer.source = this.state.source - if(this.state.type !== 'raster') { + if(this.state.type !== 'raster' && this.state['source-layer']) { layer['source-layer'] = this.state['source-layer'] } }