Skip to content

Commit

Permalink
Fix retries by cloning request before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
sholladay committed Jan 30, 2020
1 parent bb46ca8 commit 960f3f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ class Ky {
}

if (this._options.timeout === false) {
return globals.fetch(this.request);
return globals.fetch(this.request.clone());
}

return timeout(globals.fetch(this.request), this._options.timeout, this.abortController);
return timeout(globals.fetch(this.request.clone()), this._options.timeout, this.abortController);
}

/* istanbul ignore next */
Expand Down

0 comments on commit 960f3f6

Please sign in to comment.