Instanceof operator was not working so changed the way of checking it

This commit is contained in:
2022-07-17 08:17:13 +05:30
parent 4072733dfe
commit dbdd00119a
27 changed files with 36 additions and 44 deletions
@@ -50,10 +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.type = new AccountType({
name: 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;
});