From 184dca62f6acb49dbd92f86af35f39fc674e59a3 Mon Sep 17 00:00:00 2001 From: tanshu Date: Sat, 12 Dec 2020 10:26:12 +0530 Subject: [PATCH] Fix: Save product for new product would bork as productGroup as null and not undefined. --- .../src/app/product/product-detail/product-detail.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlord/src/app/product/product-detail/product-detail.component.ts b/overlord/src/app/product/product-detail/product-detail.component.ts index a0697256..5102063b 100644 --- a/overlord/src/app/product/product-detail/product-detail.component.ts +++ b/overlord/src/app/product/product-detail/product-detail.component.ts @@ -128,7 +128,7 @@ export class ProductDetailComponent implements OnInit, AfterViewInit { this.item.isPurchased = formModel.isPurchased; this.item.isSold = formModel.isSold; this.item.isActive = formModel.isActive; - if (this.item.productGroup === undefined) { + if (this.item.productGroup === null || this.item.productGroup === undefined) { this.item.productGroup = new ProductGroup(); } this.item.productGroup.id = formModel.productGroup;