FIX: UI: updateProperty duplicates
This commit is contained in:
parent
0111036617
commit
ac750e9515
@ -54,9 +54,12 @@ export class PropertyListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updateProperty(property: Property, existing: boolean): void {
|
private updateProperty(property: Property, existing: boolean): void {
|
||||||
|
if (property.type === PropertyType.BOOLEAN) {
|
||||||
this.updateProperty2(this.booleans, property, existing);
|
this.updateProperty2(this.booleans, property, existing);
|
||||||
|
} else if (property.type === PropertyType.SHUTTER) {
|
||||||
this.updateProperty2(this.shutters, property, existing);
|
this.updateProperty2(this.shutters, property, existing);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private updateProperty2(properties: Property[], property: Property, existing: boolean) {
|
private updateProperty2(properties: Property[], property: Property, existing: boolean) {
|
||||||
const index: number = properties.findIndex(p => p.id === property.id);
|
const index: number = properties.findIndex(p => p.id === property.id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user