Skip to content

Commit

Permalink
Merge pull request #1819 from mgenereu/patch-1
Browse files Browse the repository at this point in the history
Run stringify once
  • Loading branch information
simov committed Oct 6, 2015
2 parents d027211 + 1a02876 commit 90438fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions request.js
Expand Up @@ -1143,12 +1143,12 @@ Request.prototype.qs = function (q, clobber) {
base[i] = q[i]
}

if (self._qs.stringify(base) === '') {
var qs = self._qs.stringify(base)

if (qs === '') {
return self
}

var qs = self._qs.stringify(base)

self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs)
self.url = self.uri
self.path = self.uri.path
Expand Down

0 comments on commit 90438fa

Please sign in to comment.