Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuan Wang committed Jun 27, 2013
1 parent 21da21a commit 3d7a414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ Abstract.prototype.request = function(method, uri) {
if (args.length == 3) {
callback = args.pop()
}
if (method.toUpperCase() === 'GET' && json !== null) {
if (method.toUpperCase() === 'GET' && json) {

uri.push("?" + qs.stringify(json))
}
uriJoin = uri.join('/')
url = (uriJoin.indexOf('://') == -1 ? c.BASE_URL : "") + uriJoin
url = (uriJoin.indexOf('://') === -1 ? c.BASE_URL : "") + uriJoin
options = merge(this.options, { 'method': method, 'url': url, 'body': json } )
this.req(options, function(err, resp, body) {
if (err) { return callback(err) }
Expand Down

0 comments on commit 3d7a414

Please sign in to comment.