fixed error, not using createAxiosRetry() when not using register/registerAsync()
This commit is contained in:
parent
995e61e8a7
commit
3e2d961a2e
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ import {
|
|||
} from './interfaces';
|
||||
import axiosRetry from 'axios-retry';
|
||||
|
||||
const createAxiosRetry = (config: HttpModuleOptions) => {
|
||||
const createAxiosRetry = (config?: HttpModuleOptions) => {
|
||||
const axiosInstance = Axios.create(config);
|
||||
axiosRetry(axiosInstance, config);
|
||||
return axiosInstance;
|
||||
|
@ -25,7 +25,7 @@ const createAxiosRetry = (config: HttpModuleOptions) => {
|
|||
HttpService,
|
||||
{
|
||||
provide: AXIOS_INSTANCE_TOKEN,
|
||||
useValue: Axios,
|
||||
useValue: createAxiosRetry(),
|
||||
},
|
||||
],
|
||||
exports: [HttpService],
|
||||
|
|
Loading…
Reference in a new issue