From fd2599f4a1d298e19e7bc45e435ecca535fd8599 Mon Sep 17 00:00:00 2001 From: piotrpekala7 <31202938+piotrpekala7@users.noreply.github.com> Date: Thu, 16 Jan 2020 13:08:13 +0100 Subject: [PATCH] Update edit-project-dialog.component.ts --- .../edit-project-dialog/edit-project-dialog.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/projects/edit-project-dialog/edit-project-dialog.component.ts b/src/app/components/projects/edit-project-dialog/edit-project-dialog.component.ts index 2493bf0c..f6fd15c9 100644 --- a/src/app/components/projects/edit-project-dialog/edit-project-dialog.component.ts +++ b/src/app/components/projects/edit-project-dialog/edit-project-dialog.component.ts @@ -49,7 +49,9 @@ export class EditProjectDialogComponent implements OnInit { this.formGroup.controls['height'].setValue(this.project.scene_height); this.formGroup.controls['nodeGridSize'].setValue(this.project.grid_size); this.formGroup.controls['drawingGridSize'].setValue(this.project.drawing_grid_size); - this.project.variables.forEach(n => this.variables.push(n)); + if (this.project.variables) { + this.project.variables.forEach(n => this.variables.push(n)); + } } addVariable() {