Instanceof operator was not working so changed the way of checking it
This commit is contained in:
@ -36,7 +36,7 @@ export class IssueDialogComponent implements OnInit {
|
||||
});
|
||||
// Listen to Batch Autocomplete Change
|
||||
this.batches = this.form.controls.batch.valueChanges.pipe(
|
||||
map((x) => (x instanceof Batch ? x.name : x)),
|
||||
map((x) => ((x as Batch).name !== undefined ? (x as Batch).name : (x as string))),
|
||||
map((x) => (x !== null && x.length >= 1 ? x : '')),
|
||||
debounceTime(150),
|
||||
distinctUntilChanged(),
|
||||
|
||||
@ -85,7 +85,7 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
// Listen to Batch Autocomplete Change
|
||||
this.batches = this.form.controls.addRow.controls.batch.valueChanges.pipe(
|
||||
map((x) => (x instanceof Batch ? x.name : x)),
|
||||
map((x) => ((x as Batch).name !== undefined ? (x as Batch).name : (x as string))),
|
||||
map((x) => (x !== null && x.length >= 1 ? x : '')),
|
||||
debounceTime(150),
|
||||
distinctUntilChanged(),
|
||||
|
||||
Reference in New Issue
Block a user