From ac750e95150326cee2c500896f1fccabb17630ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Mon, 25 Nov 2024 15:11:06 +0100 Subject: [PATCH] FIX: UI: updateProperty duplicates --- .../src/app/pages/property/list/property-list.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/angular/src/app/pages/property/list/property-list.component.ts b/src/main/angular/src/app/pages/property/list/property-list.component.ts index d030053..17d0e22 100644 --- a/src/main/angular/src/app/pages/property/list/property-list.component.ts +++ b/src/main/angular/src/app/pages/property/list/property-list.component.ts @@ -54,8 +54,11 @@ export class PropertyListComponent implements OnInit { } private updateProperty(property: Property, existing: boolean): void { - this.updateProperty2(this.booleans, property, existing); - this.updateProperty2(this.shutters, property, existing); + if (property.type === PropertyType.BOOLEAN) { + this.updateProperty2(this.booleans, property, existing); + } else if (property.type === PropertyType.SHUTTER) { + this.updateProperty2(this.shutters, property, existing); + } } private updateProperty2(properties: Property[], property: Property, existing: boolean) {