Fix error

This commit is contained in:
Pieter Vander Vennet 2023-11-11 14:52:01 +01:00
parent ffc8c59223
commit 7d3e5b6133
2 changed files with 13 additions and 1 deletions

View file

@ -1062,6 +1062,12 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
)
}
if (json.presets?.length > 0) {
if (!(json.pointRendering?.length > 0)) {
context.enter("presets").warn("A preset is defined, but there is no pointRendering")
}
}
if (json.source === "special") {
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
context.err(
@ -1377,6 +1383,7 @@ export class ValidateLayer extends Conversion<
context.err("Could not parse layer due to:" + e)
return undefined
}
for (let i = 0; i < (layerConfig.calculatedTags ?? []).length; i++) {
const [_, code, __] = layerConfig.calculatedTags[i]
try {