added optional chaining to createAxiosInstance()

This commit is contained in:
ben 2021-12-24 00:27:34 +02:00
parent 98f8509885
commit 490f480a7a
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",