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

@ -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 = {
title: Translations.T(pr.title, `${translationContext}.presets.${i}.title`),
tags: pr.tags.map((t) => TagUtils.SimpleTag(t)),