From 38faf19ffea2abb2ab4170a28019a4ea6c476073 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 27 Jul 2016 13:35:08 +0100 Subject: [PATCH] Fix displaying unset task names --- .../src/components/widgets/widget.model.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/widget.model.ts b/ng2-components/ng2-activiti-form/src/components/widgets/widget.model.ts index af51fe83d0..ac2635d2c5 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/widget.model.ts +++ b/ng2-components/ng2-activiti-form/src/components/widgets/widget.model.ts @@ -317,10 +317,12 @@ export class FormOutcomeModel extends FormWidgetModel { export class FormModel { + private UNSET_TASK_NAME: string = 'Nameless task'; + private _id: string; private _name: string; private _taskId: string; - private _taskName: string; + private _taskName: string = this.UNSET_TASK_NAME; get id(): string { return this._id; @@ -369,7 +371,7 @@ export class FormModel { this._id = json.id; this._name = json.name; this._taskId = json.taskId; - this._taskName = json.taskName; + this._taskName = json.taskName || this.UNSET_TASK_NAME; let tabCache: WidgetModelCache = {};