Add error message
This commit is contained in:
parent
7d02f48b01
commit
64c392e2a3
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,9 @@ export default class LayerConfig extends WithContextLoader {
|
|||
|
||||
this.syncSelection = json.syncSelection ?? "no"
|
||||
if(!json.source){
|
||||
if(json.presets === undefined){
|
||||
throw "Error while parsing "+json.id+" in "+context+"; no source given"
|
||||
}
|
||||
this.source = new SourceConfig({
|
||||
osmTags: TagUtils.Tag({or: json.presets.map(pr => ({and:pr.tags}))})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue