Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

fix url update function to ignore null/undefined values #340

Merged
merged 1 commit into from
Jul 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/renderGraphiQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ add "&raw" to the end of the URL within a browser.

// Produce a Location query string from a parameter object.
function locationQuery(params) {
return '?' + Object.keys(params).map(function (key) {
return '?' + Object.keys(params).filter(function (key) {
return Boolean(params[key]);
}).map(function (key) {
return encodeURIComponent(key) + '=' +
encodeURIComponent(params[key]);
}).join('&');
Expand Down