aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/ComponentContainer.tsx')
-rw-r--r--server/sonar-web/src/main/js/app/components/ComponentContainer.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
index 2220ec14d6c..1e788618770 100644
--- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
+++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
@@ -155,6 +155,10 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
};
fetchBranches = async (componentWithQualifier: Component) => {
+ const {
+ appState: { branchesEnabled }
+ } = this.props;
+
const breadcrumb = componentWithQualifier.breadcrumbs.find(({ qualifier }) => {
return ([ComponentQualifier.Application, ComponentQualifier.Project] as string[]).includes(
qualifier
@@ -168,7 +172,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
const { key } = breadcrumb;
const [branches, pullRequests] = await Promise.all([
getBranches(key),
- breadcrumb.qualifier === ComponentQualifier.Application
+ !branchesEnabled || breadcrumb.qualifier === ComponentQualifier.Application
? Promise.resolve([])
: getPullRequests(key)
]);