Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Commit

Permalink
remove object spread
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Mar 22, 2018
1 parent b69ecfb commit 62d3574
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ function request(snek, options = snek.options) {

const handleResponse = (stream) => {
if (options.redirect === 'follow' && [301, 302, 303, 307, 308].includes(statusCode)) {
resolve(request(snek, {
...options,
resolve(request(snek, Object.assign({}, options, {
url: UrlResolve(options.url, headers.location),
}));
})));
if (req.abort)
req.abort();
else if (req.close)
Expand Down

0 comments on commit 62d3574

Please sign in to comment.