Fix: Batch autocomplete would bork on empty string as it would try to split Null

v8.0.1
This commit is contained in:
2020-10-11 16:02:41 +05:30
parent 889cac237c
commit 14930954a2
11 changed files with 34 additions and 32 deletions

View File

@ -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(),

View File

@ -1,5 +1,5 @@
export const environment = {
production: true,
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
version: '8.0.0',
version: '8.0.1',
};

View File

@ -5,7 +5,7 @@
export const environment = {
production: false,
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
version: '8.0.0',
version: '8.0.1',
};
/*