Add error message

This commit is contained in:
Pieter Vander Vennet 2024-08-23 02:33:25 +02:00
parent 7d02f48b01
commit 64c392e2a3

View file

@ -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}))})
})