Merge pull request #12 from benhason1/hotfix--optional-config
added optional chaining to createAxiosInstance()
This commit is contained in:
commit
9dfdf3e76b
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ import axiosBetterStacktrace from 'axios-better-stacktrace';
|
||||||
const createAxiosInstance = (config?: HttpModuleOptions) => {
|
const createAxiosInstance = (config?: HttpModuleOptions) => {
|
||||||
const axiosInstance = Axios.create(config);
|
const axiosInstance = Axios.create(config);
|
||||||
axiosRetry(axiosInstance, config);
|
axiosRetry(axiosInstance, config);
|
||||||
if(config.isBetterStackTraceEnabled === undefined || config.isBetterStackTraceEnabled) {
|
if(config?.isBetterStackTraceEnabled === undefined || config?.isBetterStackTraceEnabled) {
|
||||||
axiosBetterStacktrace(axiosInstance);
|
axiosBetterStacktrace(axiosInstance);
|
||||||
}
|
}
|
||||||
return axiosInstance;
|
return axiosInstance;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "nestjs-http-promise",
|
"name": "nestjs-http-promise",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"nestjs",
|
"nestjs",
|
||||||
"http",
|
"http",
|
||||||
|
|
Loading…
Reference in a new issue