summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/url/00_url.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index 659e6a37b..5479cb59c 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -92,6 +92,11 @@
{ prefix, context: "Argument 1" },
);
this[webidl.brand] = webidl.brand;
+ if (!init) {
+ // if there is no query string, return early
+ this[_list] = [];
+ return;
+ }
if (typeof init === "string") {
// Overload: USVString