dev #14305 Изменение дизайна WPA Кофе-лайка: fix infinity loading when login (typescript error)
This commit is contained in:
parent
238b70e95b
commit
7bade7caea
@ -45,7 +45,8 @@ export class WpJsonService {
|
||||
getCustomerInfo(systemId: string, token: string, url: string): Observable<any> {
|
||||
return this._request(`customer_info/${systemId}/${token}/`, 'GET', null, false, url).pipe(
|
||||
switchMap((response) => {
|
||||
if (response?.customer_info?.errorCode !== 'Customer_CustomerNotFound') {
|
||||
// TODO: typescript compile optional chaining ('response?.customer_info?.errorCode') without check ('response.customer_info.errorCode')
|
||||
if (response && response.customer_info && response.customer_info.errorCode !== 'Customer_CustomerNotFound') {
|
||||
return of(response)
|
||||
} else {
|
||||
return this.newCustomer(systemId, token, url).pipe(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user