From 2efb6bea72946ec54c586f3c8a409649b3cbdc72 Mon Sep 17 00:00:00 2001 From: Sine Jespersen Date: Wed, 9 Oct 2024 11:03:05 +0200 Subject: [PATCH] 2314: check if inScreenGroups exists on mapgroups --- src/components/screen/screen-manager.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/screen/screen-manager.jsx b/src/components/screen/screen-manager.jsx index 6c5db2d4..c9ea4249 100644 --- a/src/components/screen/screen-manager.jsx +++ b/src/components/screen/screen-manager.jsx @@ -127,9 +127,12 @@ function ScreenManager({ * @returns {Array | null} A mapped array with group ids or null */ function mapGroups() { - return formStateObject.inScreenGroups.map((group) => { - return idFromUrl(group); - }); + if (formStateObject.inScreenGroups) { + return formStateObject.inScreenGroups.map((group) => { + return idFromUrl(group); + }); + } + return []; } /** @@ -254,7 +257,7 @@ function ScreenManager({ regions: mapPlaylistsWithRegion(), }), }; - + debugger; setLoadingMessage(t("loading-messages.saving-screen")); if (saveMethod === "POST") {