Fix: Save product for new product would bork as productGroup as null and not undefined.
This commit is contained in:
parent
24ea8096c4
commit
184dca62f6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user