Skip to content

Commit

Permalink
Fix header append
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Nov 6, 2023
1 parent 872e71d commit 87a23db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Empty file modified dist/cli.js
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions dist/lib/fetch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lib/fetch.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default async function Fetch(

url.searchParams.append('f', 'json');

if (opts.headers) Object.assign(opts.headers, config.headers);
if (!opts.headers) opts.headers = {};
Object.assign(opts.headers, config.headers);

const headers: HeadersInit = new Headers();
headers.set('Accept-Encoding', 'gzip');
Expand Down

0 comments on commit 87a23db

Please sign in to comment.