1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix(URL): Add missing part assignment (#7239)

This commit is contained in:
Nayeem Rahman 2020-08-29 09:12:10 +01:00 committed by GitHub
parent 84086e7d32
commit d6dc797d15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -339,6 +339,7 @@
}
usedNonBase = true;
} else {
parts.slashes = baseParts.slashes;
parts.username = baseParts.username;
parts.password = baseParts.password;
parts.hostname = baseParts.hostname;

View file

@ -342,6 +342,8 @@ unitTest(function urlBase(): void {
assertEquals(new URL("efgh:", "http://foo/a/b?c#d").href, "efgh:");
assertEquals(new URL("efgh:", "file://foo/a/b?c#d").href, "efgh:");
assertEquals(new URL("efgh:", "abcd://foo/a/b?c#d").href, "efgh:");
assertEquals(new URL("/foo", "abcd:/").href, "abcd:/foo");
});
unitTest(function urlDriveLetterBase() {