From 2c765dbc527975e5c06fcd466ee7dc18464781d4 Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Tue, 17 Mar 2020 15:57:28 +0200 Subject: [PATCH] Fixed issue when canceling dataset edit after at least one change --- .../app/ui/dataset/dataset-wizard/dataset-wizard.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index fc97ae0ad..2e66c4bce 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -412,7 +412,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr if (!isNullOrUndefined(this.lock)) { this.lockService.unlockTarget(this.datasetWizardModel.id).pipe(takeUntil(this._destroyed)).subscribe( complete => { - this.location.back(); + this.publicMode ? this.router.navigate(['/explore']) : this.router.navigate(['/datasets']); }, error => { this.formGroup.get('status').setValue(DmpStatus.Draft); @@ -421,7 +421,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr ) } else { - this.location.back(); + this.publicMode ? this.router.navigate(['/explore']) : this.router.navigate(['/datasets']); } }