diff options
author | 2023-10-17 14:10:25 -0700 | |
---|---|---|
committer | 2023-10-17 14:10:25 -0700 | |
commit | 7458b969c5d9971e89d187b687e1924e78da427e (patch) | |
tree | ee3dbf95c728cf407bf49a27826b541e9264a8bd /src/js/node/url.js | |
parent | d4a2c29131ec154f5e4db897d4deedab2002cbc4 (diff) | |
parent | e91436e5248d947b50f90b4a7402690be8a41f39 (diff) | |
download | bun-7458b969c5d9971e89d187b687e1924e78da427e.tar.gz bun-7458b969c5d9971e89d187b687e1924e78da427e.tar.zst bun-7458b969c5d9971e89d187b687e1924e78da427e.zip |
Merge branch 'main' into postinstall_3
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(); } |