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.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) => {