Chore: fix build

This commit is contained in:
Pieter Vander Vennet 2025-05-03 12:59:18 +02:00
parent d322cba3b3
commit 07d5c85971
3 changed files with 18 additions and 8 deletions

View file

@ -3,6 +3,8 @@
id="Layer_1" id="Layer_1"
data-name="Layer 1" data-name="Layer 1"
viewBox="0 0 400 400" viewBox="0 0 400 400"
height="400"
width="400"
version="1.1" version="1.1"
sodipodi:docname="cycle-infra.svg" sodipodi:docname="cycle-infra.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Before After
Before After

View file

@ -408,7 +408,13 @@
"osmTags": { "osmTags": {
"and": [ "and": [
"information=guidepost", "information=guidepost",
"bicycle=yes" {
"or": [
"bicycle=yes",
"guidepost~.*bicycle",
"guidepost~.*mtb.*"
]
}
] ]
} }
}, },
@ -417,13 +423,7 @@
"tags": [ "tags": [
"tourism=information", "tourism=information",
"information=guidepost", "information=guidepost",
{ "bicycle=yes"
"or": [
"bicycle=yes",
"guidepost~.*bicycle",
"guidepost~.*mtb.*"
]
}
] ]
} }
], ],

View file

@ -194,6 +194,14 @@ export default class LayerConfig extends WithContextLoader {
} }
} }
if (!Array.isArray(pr.tags)) {
throw context + ": Preset " + i + " tags are not an array"
}
if (pr.tags.some(t => typeof t !== "string")) {
throw context + ": Preset " + i + ": all tags should be a simple tag (thus: a string) which should also be uploadable. A non-string type is found"
}
const config: PresetConfig = { const config: PresetConfig = {
title: Translations.T(pr.title, `${translationContext}.presets.${i}.title`), title: Translations.T(pr.title, `${translationContext}.presets.${i}.title`),
tags: pr.tags.map((t) => TagUtils.SimpleTag(t)), tags: pr.tags.map((t) => TagUtils.SimpleTag(t)),