Skip to content

Commit 9041423

Browse files
committed
Update locationQuery to take location as second parameter
1 parent d34f105 commit 9041423

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

graphiql.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,8 @@ add "&raw" to the end of the URL within a browser.
148148
});
149149
150150
// Produce a Location query string from a parameter object.
151-
function locationQuery(params) {
152-
return '?' + Object.keys(params).filter(function (key) {
153-
return Boolean(params[key]);
154-
}).map(function (key) {
151+
function locationQuery(params, location) {
152+
return (location ? location: '') + '?' + Object.keys(params).map(function (key) {
155153
return encodeURIComponent(key) + '=' +
156154
encodeURIComponent(params[key]);
157155
}).join('&');

0 commit comments

Comments
 (0)