mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:01:16 +01:00
Only set source layer if not undefined
This commit is contained in:
parent
6be6db8f5e
commit
68685dcf42
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ class AddModal extends React.Component {
|
||||||
|
|
||||||
if(this.state.type !== 'background') {
|
if(this.state.type !== 'background') {
|
||||||
layer.source = this.state.source
|
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']
|
layer['source-layer'] = this.state['source-layer']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue