From cb7d065c31a754984837d2d4fa726293979b6268 Mon Sep 17 00:00:00 2001 From: Vladyslav Palyvoda Date: Mon, 18 Nov 2024 16:08:24 +0200 Subject: [PATCH] fix: Edit branch (#487) --- .../components/CodebaseBranchesList/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/component-details/components/CodebaseBranchesList/index.tsx b/src/pages/component-details/components/CodebaseBranchesList/index.tsx index 241f2d01..c2bac62f 100644 --- a/src/pages/component-details/components/CodebaseBranchesList/index.tsx +++ b/src/pages/component-details/components/CodebaseBranchesList/index.tsx @@ -45,13 +45,14 @@ export const CodebaseBranchesList = () => { {codebaseBranches.length ? ( <> {codebaseBranches.map((codebaseBranchData: CodebaseBranchKubeObjectInterface) => { - const branchId = codebaseBranchData.spec.branchName; + const codebaseBranch = codebaseBranchData?.jsonData; + const branchId = codebaseBranch.spec.branchName; return ( @@ -64,7 +65,7 @@ export const CodebaseBranchesList = () => { handleClick={() => setDialog(ManageCodebaseBranchDialog, { codebase: component, - defaultBranch: codebaseBranches?.[0], + defaultBranch: codebaseBranches?.[0]?.jsonData, pipelines, }) }