mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix wrapped field resolving (#2305)
check for the type property before resolving a wrapped field (addresses issue with empty field objects)
This commit is contained in:
committed by
Eugenio Romano
parent
4c76f30acf
commit
acef0c1159
@@ -104,8 +104,14 @@ export class FormFieldComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
private getField() {
|
||||
return (this.field.params && this.field.params.field) ? this.field.params.field : this.field;
|
||||
private getField(): FormFieldModel {
|
||||
if (this.field && this.field.params) {
|
||||
const wrappedField = this.field.params.field;
|
||||
if (wrappedField && wrappedField.type) {
|
||||
return wrappedField;
|
||||
}
|
||||
}
|
||||
return this.field;
|
||||
}
|
||||
|
||||
private hasController(type: string): boolean {
|
||||
|
Reference in New Issue
Block a user