From 2f07956b01dfb201df425ccbfc5dd0f7fadd84e2 Mon Sep 17 00:00:00 2001 From: Sue Ann Kim Date: Tue, 8 Nov 2022 09:46:05 -0800 Subject: [PATCH] When source isn't provided in constructing the HttpAgent, this._fetchOptions and this._callOptions will automatically get fromm provided options. --- packages/agent/src/agent/http/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/agent/src/agent/http/index.ts b/packages/agent/src/agent/http/index.ts index 056d64158..e52709762 100644 --- a/packages/agent/src/agent/http/index.ts +++ b/packages/agent/src/agent/http/index.ts @@ -186,12 +186,12 @@ export class HttpAgent implements Agent { this._pipeline = [...options.source._pipeline]; this._identity = options.source._identity; this._fetch = options.source._fetch; - this._fetchOptions = options.source._fetchOptions || options.fetchOptions; - this._callOptions = options.source._callOptions || options.callOptions; this._host = options.source._host; this._credentials = options.source._credentials; } else { this._fetch = options.fetch || getDefaultFetch() || fetch.bind(global); + this._fetchOptions = options.fetchOptions; + this._callOptions = options.callOptions; } if (options.host !== undefined) { if (!options.host.match(/^[a-z]+:/) && typeof window !== 'undefined') {