Skip to content

Commit

Permalink
ignore undefined query string
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanonymous-GitHub committed Mar 28, 2020
1 parent 003d01e commit 44a7143
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website-new/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ function request(url, method, parameters, ...header) {
let httpRequest = new XMLHttpRequest();
header.forEach(h => httpRequest.setRequestHeader(h.key, h.value));
if (method === "GET") {
url += ("?" + parameters);
if (parameters) {
url += ("?" + parameters || "");
}
parameters = null;
}
httpRequest.open(method, url);
Expand Down

0 comments on commit 44a7143

Please sign in to comment.