From: Stas Vilchik Date: Tue, 3 Apr 2018 07:15:41 +0000 (+0200) Subject: SONAR-10537 Homepage icon not always highlighted correctly (#86) X-Git-Tag: 7.5~1426 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=340950d96f60bd730962296784c2465da2e3dc23;p=sonarqube.git SONAR-10537 Homepage icon not always highlighted correctly (#86) --- diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx index d8a16d8066e..bb998f285ae 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.tsx @@ -108,8 +108,8 @@ function getCurrentPage(component: Component, branchLike: BranchLike | undefined } else if (component.qualifier === 'APP') { currentPage = { type: HomePageType.Application, component: component.key }; } else if (component.qualifier === 'TRK') { - const branch = - isMainBranch(branchLike) || isLongLivingBranch(branchLike) ? branchLike.name : undefined; + // when home page is set to the default branch of a project, its name is returned as `undefined` + const branch = isLongLivingBranch(branchLike) ? branchLike.name : undefined; currentPage = { type: HomePageType.Project, component: component.key, branch }; } return currentPage;