aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2018-05-29 14:53:51 +0200
committerSonarTech <sonartech@sonarsource.com>2018-06-01 20:20:47 +0200
commitfa9d4c659b1ecfcc3cb7b76994282230babcd3e8 (patch)
treef200abb7015bb9d935eb8d1427d085143b0cc93e /server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
parent270239f18e866cecaa3bda198f24515b48c05e3b (diff)
downloadsonarqube-fa9d4c659b1ecfcc3cb7b76994282230babcd3e8.tar.gz
sonarqube-fa9d4c659b1ecfcc3cb7b76994282230babcd3e8.zip
SONAR-10571 Always display failed background task notif on all branches
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.tsx8
1 files changed, 7 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 27165885dc5..11d254b4ada 100644
--- a/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
+++ b/server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
@@ -146,7 +146,13 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
getCurrentTask = (branchLike?: BranchLike) => {
const { currentTask } = this.state;
- return currentTask && this.isSameBranch(currentTask, branchLike) ? currentTask : undefined;
+ if (!currentTask) {
+ return undefined;
+ }
+
+ return currentTask.status === STATUSES.FAILED || this.isSameBranch(currentTask, branchLike)
+ ? currentTask
+ : undefined;
};
getPendingTasks = (branchLike?: BranchLike) => {