Fix: maproulette import flow

This commit is contained in:
Pieter Vander Vennet 2023-06-09 16:13:35 +02:00
parent f80054558f
commit 5f7cc351c9
18 changed files with 331 additions and 114 deletions

View file

@ -356,7 +356,12 @@ class LayerOverviewUtils extends Script {
const context = "While building builtin layer " + sharedLayerPath
const fixed = prepLayer.convertStrict(parsed, context)
if (typeof fixed.source !== "string" && fixed.source["osmTags"]["and"] === undefined) {
if(!fixed.source){
console.error(sharedLayerPath,"has no source configured:",fixed)
throw sharedLayerPath+" layer has no source configured"
}
if (typeof fixed.source !== "string" && fixed.source["osmTags"] && fixed.source["osmTags"]["and"] === undefined) {
fixed.source["osmTags"] = { and: [fixed.source["osmTags"]] }
}