Fix build

This commit is contained in:
Pieter Vander Vennet 2024-01-01 19:04:11 +01:00
parent 8dd1a0e107
commit 50f3e71d55

View file

@ -284,7 +284,7 @@ async function generateCsp(
if (typeof sv.needsUrls === "function") {
return
}
apiUrls.push(...sv.needsUrls)
apiUrls.push(...(sv.needsUrls ?? []))
})
const usedSpecialVisualisations = ValidationUtils.getSpecialVisualisationsWithArgs(layoutJson)
@ -292,7 +292,7 @@ async function generateCsp(
if (typeof usedSpecialVisualisation === "string") {
continue
}
const neededUrls = usedSpecialVisualisation.func.needsUrls
const neededUrls = usedSpecialVisualisation.func.needsUrls ?? []
if (typeof neededUrls === "function") {
apiUrls.push(...neededUrls(usedSpecialVisualisation.args))
}