From 50f3e71d550531ca7bd4f7aad4b1dbf6e1a2c365 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 1 Jan 2024 19:04:11 +0100 Subject: [PATCH] Fix build --- scripts/generateLayouts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generateLayouts.ts b/scripts/generateLayouts.ts index 39fe9e70e..509bc6959 100644 --- a/scripts/generateLayouts.ts +++ b/scripts/generateLayouts.ts @@ -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)) }