diff options
Diffstat (limited to 'src/js/node/url.js')
-rw-r--r-- | src/js/node/url.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/js/node/url.js b/src/js/node/url.js index 3b6b57ac2..f5823cdc2 100644 --- a/src/js/node/url.js +++ b/src/js/node/url.js @@ -370,7 +370,8 @@ Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) { this.search = rest.substr(qm); this.query = rest.substr(qm + 1); if (parseQueryString) { - this.query = new URLSearchParams(this.query); + const query = this.query; + this.query = new URLSearchParams(query).toJSON(); } rest = rest.slice(0, qm); } else if (parseQueryString) { @@ -409,7 +410,7 @@ function urlFormat(obj) { obj = urlParse(obj); } if (!(obj instanceof Url)) { - return Url.prototype.format.call(obj); + return Url.prototype.format.$call(obj); } return obj.format(); } |