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