Instanceof operator was not working so changed the way of checking it
This commit is contained in:
@ -56,7 +56,7 @@ export class LedgerComponent implements OnInit, AfterViewInit {
|
||||
});
|
||||
|
||||
this.accounts = this.form.controls.account.valueChanges.pipe(
|
||||
map((x) => (x instanceof Account ? x.name : x)),
|
||||
map((x) => ((x as Account).name !== undefined ? (x as Account).name : (x as string))),
|
||||
map((x) => (x !== null && x.length >= 1 ? x : null)),
|
||||
debounceTime(150),
|
||||
distinctUntilChanged(),
|
||||
|
||||
Reference in New Issue
Block a user