Skip to content

Commit ed5ad89

Browse files
committed
fix(core): handle undefined enum value in display-configurable-enum.component.ts gracefully
1 parent b7877ac commit ed5ad89

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/core/basic-datatypes/configurable-enum/display-configurable-enum/display-configurable-enum.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ export class DisplayConfigurableEnumComponent
2323
iterableValue: ConfigurableEnumValue[] = [];
2424

2525
ngOnInit() {
26+
this.initValue();
27+
}
28+
29+
private initValue() {
30+
if (!this.value) {
31+
return;
32+
}
33+
2634
if (Array.isArray(this.value)) {
2735
this.iterableValue = this.value;
2836
} else if (this.value) {

0 commit comments

Comments
 (0)