-
-
Notifications
You must be signed in to change notification settings - Fork 971
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Actually set empty serialized query to OptionalNone
Because the type returned by to_string is a String, _not_ an Optional<String>, the following code: if (serialized_query.is_empty()) serialized_query = {}; Was achieving nothing at all! Make sure that the type is an Optional<String> so that we're not just setting an empty string to an empty string.
- Loading branch information
1 parent
1ba6dbd
commit d755a83
Showing
3 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
Tests/LibWeb/Text/expected/URL/search-params-with-no-query.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
https://www.birdoftheyear.org.nz/? | ||
https://www.birdoftheyear.org.nz/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script src="../include.js"></script> | ||
<script> | ||
test(() => { | ||
let url = new URL("https://www.birdoftheyear.org.nz/?") | ||
println(url.href); | ||
url.searchParams.sort() | ||
println(url.href); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters