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;