diff --git a/src/components/task.vue b/src/components/task.vue index 12c3d78e1..a130051d6 100644 --- a/src/components/task.vue +++ b/src/components/task.vue @@ -320,11 +320,9 @@ export default { this.redirecting = task.process_request_id; this.$emit('redirect', task.id, true); return; - } else { + } else if (this.task && requestId == this.task.process_request_id && this.parentRequest && this.task.process_request.status === 'COMPLETED') { // Only emit completed after getting the subprocess tasks and there are no tasks and process is completed - if (requestId == this.task.process_request_id && this.parentRequest && this.task.process_request.status === 'COMPLETED') { - this.$emit('completed', this.parentRequest); - } + this.$emit('completed', this.parentRequest); } this.taskId = task.id; this.nodeId = task.element_id;