We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07c7512 commit b7ff413Copy full SHA for b7ff413
index.js
@@ -256,12 +256,12 @@ class API {
256
257
// Strip the headers, keep whitelist
258
const strippedHeaders = Object.entries(response._headers).reduce((acc, [headerName, value]) => {
259
- if (!this._errorHeaderWhitelist.includes(headerName.toLowerCase())) return acc
+ if (!this._errorHeaderWhitelist.includes(headerName.toLowerCase())) { return acc }
260
261
- return {
262
- ...acc,
263
- [headerName]: value
264
- }
+ return Object.assign(
+ acc,
+ { [headerName]: value }
+ )
265
}, {})
266
267
response._headers = strippedHeaders
0 commit comments