TSK-786: classificationId is only read if classification is selected

This commit is contained in:
Dennis Lehmann 2019-08-13 10:48:41 +02:00 committed by Holger Hagen
parent fd393bd083
commit 4b85c9f9b1
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy {
});
this.classificationSelectedSubscription = this.classificationsService.getSelectedClassification()
.subscribe(classificationSelected => {
if (this.classification && this.classification.classificationId === classificationSelected.classificationId) { return; }
if (classificationSelected && this.classification &&
this.classification.classificationId === classificationSelected.classificationId) { return; }
this.initProperties();
if (classificationSelected) {
this.fillClassificationInformation(classificationSelected);