mirror of
https://github.com/maputnik/editor.git
synced 2026-12-01 06:14:20 +00:00
Only set source layer if not undefined
This commit is contained in:
1 parent
6be6db8f5e
commit
68685dcf42
1 file changed
+1
-1
@@ -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']
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user