From 3cdebfd5df392296e4634eea76169d821facf46f Mon Sep 17 00:00:00 2001 From: Andrey Mikhadyuk Date: Wed, 13 Sep 2023 17:22:23 +0300 Subject: [PATCH] fix breadcrumbs for guests --- .../saga/fetchBreadcrumbsItemsByCommonId.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/states/multipleSpacesLayout/saga/fetchBreadcrumbsItemsByCommonId.ts b/src/store/states/multipleSpacesLayout/saga/fetchBreadcrumbsItemsByCommonId.ts index 39dd5d2f9d..b505658868 100644 --- a/src/store/states/multipleSpacesLayout/saga/fetchBreadcrumbsItemsByCommonId.ts +++ b/src/store/states/multipleSpacesLayout/saga/fetchBreadcrumbsItemsByCommonId.ts @@ -21,7 +21,9 @@ const fetchProjectsInfoByActiveCommonId = async ( const finalCommons: Common[] = []; let commonForSiblings: Common | null = activeCommon; - let lastParentCommon: Common | null = null; + let lastParentCommon: Common | null = !commonForSiblings.directParent + ? commonForSiblings + : null; while (commonForSiblings?.directParent?.commonId) { const commonIdForProjects = commonForSiblings.directParent.commonId;