Switched on the @typescript-eslint/no-non-null-assertion rule in eslint.
Fixed the errors it threw up.
This commit is contained in:
+1
-1
@@ -67,7 +67,7 @@ export class ProductGroupDetailComponent implements OnInit, AfterViewInit {
|
||||
|
||||
getItem(): ProductGroup {
|
||||
const formModel = this.form.value;
|
||||
this.item.name = formModel.name!;
|
||||
this.item.name = formModel.name ?? '';
|
||||
return this.item;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user