Merge pull request #12 from benhason1/hotfix--optional-config

added optional chaining to createAxiosInstance()
This commit is contained in:
benhason1 2021-12-24 00:28:04 +02:00 committed by GitHub
commit 9dfdf3e76b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ import axiosBetterStacktrace from 'axios-better-stacktrace';
const createAxiosInstance = (config?: HttpModuleOptions) => {
const axiosInstance = Axios.create(config);
axiosRetry(axiosInstance, config);
if(config.isBetterStackTraceEnabled === undefined || config.isBetterStackTraceEnabled) {
if(config?.isBetterStackTraceEnabled === undefined || config?.isBetterStackTraceEnabled) {
axiosBetterStacktrace(axiosInstance);
}
return axiosInstance;

View file

@ -1,6 +1,6 @@
{
"name": "nestjs-http-promise",
"version": "1.2.0",
"version": "1.2.1",
"keywords": [
"nestjs",
"http",