Skip to content

Commit

Permalink
fix(ui): create empty array when add first stage conditions (#4381)
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Coenen <[email protected]>
  • Loading branch information
bnjjj authored and yesnault committed Jun 17, 2019
1 parent 434410f commit 932fcd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/src/app/shared/conditions/conditions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,13 @@ export class ConditionsComponent extends Table<WorkflowNodeCondition> implements
addEmptyCondition(): void {
let emptyCond = new WorkflowNodeCondition();
emptyCond.operator = 'eq';
this.conditions.plain.push(emptyCond);

if (!this.conditions.plain) {
this.conditions.plain = [emptyCond];
} else {
this.conditions.plain.push(emptyCond);
}
this.conditionsChange.emit(this.conditions);
}

pushChange(event: string, e?: string): void {
Expand Down

0 comments on commit 932fcd3

Please sign in to comment.