From f660936dba16ccea6910a13f20e0a9a2dae10036 Mon Sep 17 00:00:00 2001 From: Oleksandr_Halichenko Date: Wed, 29 Oct 2025 16:32:47 +0200 Subject: [PATCH] fixed issue in request method in case if this.restClientConfig is not provided in config --- lib/rest.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rest.js b/lib/rest.js index 8b19c69..a5eb654 100644 --- a/lib/rest.js +++ b/lib/rest.js @@ -67,7 +67,8 @@ class RestClient { // Only apply proxy agents if custom agents are not explicitly provided // Priority: explicit httpsAgent/httpAgent > proxy config > default const hasCustomAgents = - 'httpsAgent' in this.restClientConfig || 'httpAgent' in this.restClientConfig; + this.restClientConfig && + ('httpsAgent' in this.restClientConfig || 'httpAgent' in this.restClientConfig); const proxyAgents = hasCustomAgents ? {} : getProxyAgentForUrl(url, this.restClientConfig); return this.axiosInstance