From b67308827632d84204d54e388eb17f8df7787d0c Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 9 Sep 2016 16:11:03 +0100 Subject: [PATCH] #723 proper rendering of empty values on complete form fix `group` and `people` pickers --- .../widgets/display-value/display-value.widget.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/display-value/display-value.widget.ts b/ng2-components/ng2-activiti-form/src/components/widgets/display-value/display-value.widget.ts index fdbc4ca994..cb2263f83a 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/display-value/display-value.widget.ts +++ b/ng2-components/ng2-activiti-form/src/components/widgets/display-value/display-value.widget.ts @@ -53,12 +53,16 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit { this.value = this.field.value === 'true' ? true : false; break; case FormFieldTypes.FUNCTIONAL_GROUP: - this.value = this.field.value.name; + if (this.field.value) { + this.value = this.field.value.name; + } break; case FormFieldTypes.PEOPLE: let model = this.field.value; - let displayName = `${model.firstName} ${model.lastName}`; - this.value = displayName.trim(); + if (model) { + let displayName = `${model.firstName} ${model.lastName}`; + this.value = displayName.trim(); + } break; case FormFieldTypes.UPLOAD: let files = this.field.value || [];