diff --git a/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts b/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts index b8998a6dd7..2ed5639c5a 100644 --- a/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts +++ b/src/app/workflowitems-edit-page/workflow-item-action-page.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { Location } from '@angular/common'; -import { Observable, forkJoin } from 'rxjs'; +import { Observable, combineLatest } from 'rxjs'; import { map, switchMap, take } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; import { WorkflowItem } from '../core/submission/models/workflowitem.model'; @@ -52,7 +52,7 @@ export abstract class WorkflowItemActionPageComponent implements OnInit { * Performs the action and shows a notification based on the outcome of the action */ performAction() { - forkJoin([this.wfi$, this.requestService.removeByHrefSubstring('/discover')]).pipe( + combineLatest([this.wfi$, this.requestService.removeByHrefSubstring('/discover')]).pipe( take(1), switchMap(([wfi]) => this.sendRequest(wfi.id)) ).subscribe((successful: boolean) => {