From 49036444ffa87c0e8b4253cc11bdb45896e75c7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rem=C3=A9nyi=20Gergely?= <remeger@sch.bme.hu>
Date: Wed, 30 Jun 2021 23:28:45 +0200
Subject: [PATCH] KST-23: fix issue with new history creation

---
 src/app/core/service-detail/service-detail.component.ts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/app/core/service-detail/service-detail.component.ts b/src/app/core/service-detail/service-detail.component.ts
index 02e86c7..181992e 100644
--- a/src/app/core/service-detail/service-detail.component.ts
+++ b/src/app/core/service-detail/service-detail.component.ts
@@ -130,6 +130,9 @@ export class ServiceDetailComponent implements OnInit {
     this.servicesService.getServiceById(this.id).subscribe(
       (s) => {
         this.service = s;
+        if (this.service.history == null) {
+          this.service.history = new Array;
+        }
         this.isLoading = false;
       },
       (error) => {
-- 
GitLab