From 490f480a7a7b9c5b087e32fda79987870a88d05d Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 24 Dec 2021 00:27:34 +0200 Subject: [PATCH] added optional chaining to createAxiosInstance() --- lib/http.module.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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",