File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export function addPasswordConfirmationInterceptors(axios: AxiosInstance): void
9393
9494 INTERCEPTOR_INITIALIZED = true
9595
96- let validatePromise : PromiseWithResolvers < void >
96+ let validatePromise : PromiseWithResolvers < void > | undefined
9797
9898 axios . interceptors . request . use ( async ( config ) => {
9999 if ( config . confirmPassword === undefined ) {
@@ -132,7 +132,7 @@ export function addPasswordConfirmationInterceptors(axios: AxiosInstance): void
132132 return response
133133 }
134134
135- if ( ! validatePromise ) {
135+ if ( validatePromise === undefined ) {
136136 logger . debug ( 'Password confirmation not required' , { response } )
137137 return response
138138 }
@@ -148,6 +148,11 @@ export function addPasswordConfirmationInterceptors(axios: AxiosInstance): void
148148 throw error
149149 }
150150
151+ if ( validatePromise === undefined ) {
152+ logger . debug ( 'Password confirmation not required' , { error } )
153+ throw error
154+ }
155+
151156 logger . debug ( 'Password confirmation failed' , { error } )
152157 validatePromise . reject ( error )
153158
You can’t perform that action at this time.
0 commit comments