From 4a747b908046e686e1a7b8c07db3de54b97c7637 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A9o=20Banno-Cloutier?=
 <leo.banno-cloutier@savoirfairelinux.com>
Date: Wed, 16 Aug 2023 13:49:45 -0400
Subject: [PATCH] jams-react-client: fix default color when enabling background

At the moment, when you enable a custom background for a blueprint, it
generates an invalid JSON where the color is undefined

Change-Id: I5a45b1b55fa12b5803326370627fa74cf96fd9aa
---
 jams-react-client/src/views/Blueprint/updatePolicyData.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jams-react-client/src/views/Blueprint/updatePolicyData.tsx b/jams-react-client/src/views/Blueprint/updatePolicyData.tsx
index 85df6b6a..984df536 100644
--- a/jams-react-client/src/views/Blueprint/updatePolicyData.tsx
+++ b/jams-react-client/src/views/Blueprint/updatePolicyData.tsx
@@ -112,7 +112,7 @@ const updateUiCustomization = (data) => {
     ui.backgroundColorOrUrl = backgroundUrl;
   } else if (backgroundColor !== "") {
     ui.backgroundType = "color";
-    ui.backgroundColorOrUrl = backgroundColor;
+    ui.backgroundColorOrUrl = backgroundColor || "#ffffff";
   } else {
     ui.backgroundType = "default";
   }
-- 
GitLab