Fix: Batch autocomplete would bork on empty string as it would try to split Null
v8.0.1
This commit is contained in:
@ -7,7 +7,7 @@ import * as moment from 'moment';
|
||||
import { Observable, of as observableOf } from 'rxjs';
|
||||
import { debounceTime, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators';
|
||||
|
||||
import { environment } from '../../environments/environment';
|
||||
import {environment} from "../../environments/environment";
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
import { Product } from '../core/product';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
@ -182,7 +182,7 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
listenToProductChanges() {
|
||||
this.products = this.resetStockForm.get('product').valueChanges.pipe(
|
||||
startWith(null),
|
||||
startWith(''),
|
||||
map((x) => (x !== null && x.length >= 1 ? x : null)),
|
||||
debounceTime(150),
|
||||
distinctUntilChanged(),
|
||||
|
||||
Reference in New Issue
Block a user