0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

perf(url): return early if url has no query string (#15856)

This commit is contained in:
Andrew Johnston 2022-09-11 04:10:06 +01:00 committed by GitHub
parent dee9f0acaf
commit 6d8f6d5af0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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