Skip to content

Commit

Permalink
2314: check if inScreenGroups exists on mapgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
sinejespersen committed Oct 9, 2024
1 parent 8c2f6d3 commit 2efb6be
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/screen/screen-manager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
}

/**
Expand Down Expand Up @@ -254,7 +257,7 @@ function ScreenManager({
regions: mapPlaylistsWithRegion(),
}),
};

debugger;
setLoadingMessage(t("loading-messages.saving-screen"));

if (saveMethod === "POST") {
Expand Down

0 comments on commit 2efb6be

Please sign in to comment.