File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export interface RetryConfig {
27
27
28
28
/**
29
29
* The instance of the axios object to which the interceptor is attached.
30
+ * @deprecated No longer needed.
30
31
*/
31
32
instance ?: AxiosInstance ;
32
33
@@ -179,7 +180,7 @@ async function onError(instance: AxiosInstance, error: AxiosError) {
179
180
config . retry = typeof config . retry === 'number' ? config . retry : 3 ;
180
181
config . retryDelay =
181
182
typeof config . retryDelay === 'number' ? config . retryDelay : 100 ;
182
- config . instance = config . instance || instance ;
183
+ instance = config . instance || instance ;
183
184
config . backoffType = config . backoffType || 'exponential' ;
184
185
config . httpMethodsToRetry = normalizeArray ( config . httpMethodsToRetry ) || [
185
186
'GET' ,
@@ -296,7 +297,7 @@ async function onError(instance: AxiosInstance, error: AxiosError) {
296
297
return Promise . resolve ( )
297
298
. then ( async ( ) => onBackoffPromise )
298
299
. then ( async ( ) => onRetryAttemptPromise )
299
- . then ( async ( ) => config . instance ! . request ( axiosError . config ! ) ) ;
300
+ . then ( async ( ) => instance . request ( axiosError . config ! ) ) ;
300
301
}
301
302
302
303
/**
You can’t perform that action at this time.
0 commit comments