From 54ce4d1174fe100e6aacabe7b7e347f7e944cf5e Mon Sep 17 00:00:00 2001 From: Oleksii Orel Date: Wed, 22 Jan 2025 15:34:17 +0200 Subject: [PATCH] fix: branding data merge (#1298) * fix: branding data merge Signed-off-by: Oleksii Orel --- .../src/services/bootstrap/branding.constant.ts | 3 --- packages/dashboard-frontend/src/store/Branding/actions.ts | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/dashboard-frontend/src/services/bootstrap/branding.constant.ts b/packages/dashboard-frontend/src/services/bootstrap/branding.constant.ts index 15a492982..7f41b4157 100644 --- a/packages/dashboard-frontend/src/services/bootstrap/branding.constant.ts +++ b/packages/dashboard-frontend/src/services/bootstrap/branding.constant.ts @@ -33,7 +33,6 @@ export type BrandingDocs = { faq?: string; storageTypes: string; webSocketTroubleshooting: string; - startWorkspaceFromGit: string; }; export type BrandingConfiguration = { @@ -84,8 +83,6 @@ export const BRANDING_DEFAULT: BrandingData = { 'https://www.eclipse.org/che/docs/stable/end-user-guide/url-parameter-for-the-workspace-storage/', webSocketTroubleshooting: 'https://www.eclipse.org/che/docs/stable/end-user-guide/troubleshooting-network-problems/', - startWorkspaceFromGit: - 'https://eclipse.dev/che/docs/stable/end-user-guide/starting-a-workspace-from-a-git-repository-url/', }, configuration: {}, }; diff --git a/packages/dashboard-frontend/src/store/Branding/actions.ts b/packages/dashboard-frontend/src/store/Branding/actions.ts index ae576b318..034794c1b 100644 --- a/packages/dashboard-frontend/src/store/Branding/actions.ts +++ b/packages/dashboard-frontend/src/store/Branding/actions.ts @@ -12,7 +12,8 @@ import common from '@eclipse-che/common'; import { createAction } from '@reduxjs/toolkit'; -import { merge } from 'lodash'; +import cloneDeep from 'lodash/cloneDeep'; +import merge from 'lodash/merge'; import { fetchApiInfo, fetchBranding } from '@/services/assets/branding'; import { BRANDING_DEFAULT, BrandingData } from '@/services/bootstrap/branding.constant'; @@ -71,7 +72,7 @@ export const actionCreators = { }; export function getBrandingData(receivedBranding?: { [key: string]: any }): BrandingData { - let branding: BrandingData = Object.assign({}, BRANDING_DEFAULT); + let branding: BrandingData = cloneDeep(BRANDING_DEFAULT); if (receivedBranding && Object.keys(receivedBranding).length > 0) { branding = merge(branding, receivedBranding);