Fix: generating layeroverview; performance: do not try to download ratings if no ratings element is present

This commit is contained in:
Pieter Vander Vennet 2023-11-19 05:05:15 +01:00
parent c13d80f062
commit fc62d41e1b
12 changed files with 67 additions and 15 deletions

View file

@ -9,6 +9,12 @@ export default class ValidationUtils {
renderingConfigs: (TagRenderingConfigJson | QuestionableTagRenderingConfigJson)[]
): RenderingSpecification[] {
const visualisations: RenderingSpecification[] = []
if (!Array.isArray(renderingConfigs)) {
throw (
"Could not inspect renderingConfigs, not an array: " +
JSON.stringify(renderingConfigs)
)
}
for (const renderConfig of renderingConfigs) {
visualisations.push(...ValidationUtils.getSpecialVisualisationsWithArgs(renderConfig))
}