Fixes bug on new Dataset Description button. (Issue #177)

This commit is contained in:
apapachristou 2019-09-24 18:32:23 +03:00
parent 27ce739382
commit c4994843c8
1 changed files with 10 additions and 2 deletions

View File

@ -429,11 +429,19 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
}
hasReversableStatus(): boolean {
return (this.formGroup.get('dmp').value.status == DmpStatus.Draft && this.formGroup.get('status').value == DatasetStatus.Finalized);
if (this.formGroup.get('dmp').value) {
return (this.formGroup.get('dmp').value.status == DmpStatus.Draft && this.formGroup.get('status').value == DatasetStatus.Finalized);
} else {
return false;
}
}
hasNotReversableStatus(): boolean {
return (this.formGroup.get('dmp').value.status == DmpStatus.Finalized && this.formGroup.get('status').value == DatasetStatus.Finalized);
if (this.formGroup.get('dmp').value) {
return (this.formGroup.get('dmp').value.status == DmpStatus.Finalized && this.formGroup.get('status').value == DatasetStatus.Finalized);
} else {
return false;
}
}
reverse() {