forked from MapComplete/MapComplete
Adjusted GenLayerOvw to support builtin object
This commit is contained in:
parent
df5fd47f2f
commit
cef4922c48
1 changed files with 10 additions and 3 deletions
|
@ -171,10 +171,17 @@ class LayerOverviewUtils {
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (layer.builtin !== undefined) {
|
let names = layer.builtin;
|
||||||
if (!knownLayerIds.has(layer.builtin)) {
|
if (names !== undefined) {
|
||||||
themeErrorCount.push("Unknown layer id: " + layer.builtin + "(which uses inheritance)")
|
if (typeof names === "string") {
|
||||||
|
names = [names]
|
||||||
}
|
}
|
||||||
|
names.forEach(name => {
|
||||||
|
if (!knownLayerIds.has(name)) {
|
||||||
|
themeErrorCount.push("Unknown layer id: " + name + "(which uses inheritance)")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// layer.builtin contains layer overrides - we can skip those
|
// layer.builtin contains layer overrides - we can skip those
|
||||||
layerErrorCount.push(...this.validateLayer(layer, undefined, knownPaths, themeFile.id))
|
layerErrorCount.push(...this.validateLayer(layer, undefined, knownPaths, themeFile.id))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue