Skip to content

Commit

Permalink
When source isn't provided in constructing the HttpAgent, this._fetch…
Browse files Browse the repository at this point in the history
…Options and this._callOptions will automatically get fromm provided options.
  • Loading branch information
wackyleo459 committed Nov 8, 2022
1 parent 2ad9a20 commit 2f07956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/agent/src/agent/http/index.ts
Expand Up @@ -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') {
Expand Down

0 comments on commit 2f07956

Please sign in to comment.