diff --git a/lib/http.module.ts b/lib/http.module.ts index f85ecdb..69a4070 100644 --- a/lib/http.module.ts +++ b/lib/http.module.ts @@ -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; diff --git a/package.json b/package.json index 483308f..fa9c1c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nestjs-http-promise", - "version": "1.2.0", + "version": "1.2.1", "keywords": [ "nestjs", "http",