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