Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixing bug where search query is appended to URL even if it doesn't exist! #91

Merged
merged 1 commit into from

2 participants

@joshrp

I think this was accidentaly introduced in #88, I only found out because I ended up with a URL ending in:

access_token=HSidfmksdj8j2dsfundefinedq=undefined which obviously screwed my authentication.

@pksunkara pksunkara merged commit 98c8b7a into pksunkara:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 2 deletions.
  1. +3 −1 lib/octonode/client.js
  2. +3 −1 src/octonode/client.coffee
View
4 lib/octonode/client.js 100644 → 100755
@@ -141,7 +141,9 @@
pathname: path,
query: query
});
- _url += "" + separator + "q=" + q;
+ if (q) {
+ _url += "" + separator + "q=" + q;
+ }
return _url;
};
View
4 src/octonode/client.coffee 100644 → 100755
@@ -101,7 +101,9 @@ class Client
pathname: path
query: query
- _url += "#{separator}q=#{q}"
+ if q
+ _url += "#{separator}q=#{q}"
+
return _url
errorHandle: (res, body, callback) ->
Something went wrong with that request. Please try again.