From 656da04effaedb8cb62c8cd6ad31081a4763adc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kilchenmann?= Date: Tue, 25 May 2021 13:53:31 +0200 Subject: [PATCH] fix(resource): add if condition (DSP-1655) (#448) --- .../resource-properties/resource-properties.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/workspace/resource/resource-properties/resource-properties.component.ts b/src/app/workspace/resource/resource-properties/resource-properties.component.ts index c92f5d64e6..57b5299686 100644 --- a/src/app/workspace/resource/resource-properties/resource-properties.component.ts +++ b/src/app/workspace/resource/resource-properties/resource-properties.component.ts @@ -106,8 +106,10 @@ export class ResourcePropertiesComponent implements OnInit, OnDestroy { // subscribe to the ValueOperationEventService and listen for an event to be emitted this.valueOperationEventSubscriptions.push(this._valueOperationEventService.on( Events.ValueAdded, (newValue: AddedEventValue) => { - this.addValueToResource(newValue.addedValue); - this.hideAddValueForm(); + if (newValue) { + this.addValueToResource(newValue.addedValue); + this.hideAddValueForm(); + } })); this.valueOperationEventSubscriptions.push(this._valueOperationEventService.on(