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
@@ -65,7 +65,7 @@ export class EmployeeAttendanceComponent implements OnInit, AfterViewInit {
});
// Listen to Employee Value Changes
this.employees = this.form.controls.employee.valueChanges.pipe(
map((x) => (x instanceof Employee ? x.name : x)),
map((x) => ((x as Employee).name !== undefined ? (x as Employee).name : (x as string))),
map((x) => (x !== null && x.length >= 1 ? x : null)),
debounceTime(150),
distinctUntilChanged(),