Skip to content

Commit

Permalink
url: create href using searchParams without bindingUrl call
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Jan 19, 2024
1 parent c2e8526 commit 3c5cb28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,9 @@ class URL {
get href() {
// URLSearchParams is used on demand, and stores the search if it's used.
if (this.#searchParams) {
return bindingUrl.update(this.#context.href, updateActions.kSearch, this.#searchParams.toString());
return StringPrototypeSlice(this.#context.href, 0, this.#context.hash_start - 1)
+ this.#searchParams.toString()
+ StringPrototypeSlice(this.#context.href, this.#context.hash_start);
}
return this.#context.href;
}
Expand Down

0 comments on commit 3c5cb28

Please sign in to comment.