diff options
author | 2023-10-04 21:31:29 -0700 | |
---|---|---|
committer | 2023-10-04 21:31:29 -0700 | |
commit | 5c8233515a58fd19e466e13ba18cce4fd9c69726 (patch) | |
tree | 6bee651499fc9a32be3778160b89464fa02dfb3d /src/js/node/url.js | |
parent | c5c7934ebc28d27342b42f40b7834bc35dd24aaf (diff) | |
download | bun-5c8233515a58fd19e466e13ba18cce4fd9c69726.tar.gz bun-5c8233515a58fd19e466e13ba18cce4fd9c69726.tar.zst bun-5c8233515a58fd19e466e13ba18cce4fd9c69726.zip |
Fix `query` property of `url` object (#6274)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/js/node/url.js')
-rw-r--r-- | src/js/node/url.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/node/url.js b/src/js/node/url.js index 3b6b57ac2..27d10c583 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) { |