Instanceof operator was not working so changed the way of checking it
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user