Skip to content

Commit

Permalink
fix: Deprecate config.instance
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed Jun 13, 2024
1 parent 1401ac7 commit 410329c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface RetryConfig {

/**
* The instance of the axios object to which the interceptor is attached.
* @deprecated No longer needed.
*/
instance?: AxiosInstance;

Expand Down Expand Up @@ -296,7 +297,7 @@ async function onError(instance: AxiosInstance, error: AxiosError) {
return Promise.resolve()
.then(async () => onBackoffPromise)
.then(async () => onRetryAttemptPromise)
.then(async () => config.instance!.request(axiosError.config!));
.then(async () => instance.request(axiosError.config!));
}

/**
Expand Down

0 comments on commit 410329c

Please sign in to comment.