Switched on the @typescript-eslint/no-non-null-assertion rule in eslint.
Fixed the errors it threw up.
This commit is contained in:
@@ -50,7 +50,7 @@ export class AccountListComponent implements OnInit, AfterViewInit {
|
||||
const data = value as { list: Account[]; accountTypes: AccountType[] };
|
||||
this.accountTypes = data.accountTypes;
|
||||
data.list.forEach(
|
||||
(x) => (x.typeName = this.accountTypes.find((y) => y.id === x.type)?.name!),
|
||||
(x) => (x.typeName = this.accountTypes.find((y) => y.id === x.type)?.name ?? ''),
|
||||
);
|
||||
this.list = data.list;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user