Skip to content

Commit aa43064

Browse files
authored
Correct null handling when computing base URL host string
1 parent 7564e2d commit aa43064

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,8 +1858,8 @@ To <dfn>convert a modifier to a string</dfn> given a [=part/modifier=] |modifier
18581858
1. If |type| is not "`pattern`" and |init| [=map/contains=] none of "{{URLPatternInit/protocol}}", "{{URLPatternInit/hostname}}", "{{URLPatternInit/port}}" and "{{URLPatternInit/username}}", then set |result|["{{URLPatternInit/username}}"] to the result of [=processing a base URL string=] given |baseURL|'s [=url/username=] and |type|.
18591859
1. If |type| is not "`pattern`" and |init| [=map/contains=] none of "{{URLPatternInit/protocol}}", "{{URLPatternInit/hostname}}", "{{URLPatternInit/port}}", "{{URLPatternInit/username}}" and "{{URLPatternInit/password}}", then set |result|["{{URLPatternInit/password}}"] to the result of [=processing a base URL string=] given |baseURL|'s [=url/password=] and |type|.
18601860
1. If |init| [=map/contains=] neither "{{URLPatternInit/protocol}}" nor "{{URLPatternInit/hostname}}", then:
1861-
1. Let |baseHost| be the [=host serializer|serialization=] of |baseURL|'s [=url/host=].
1862-
1. If |baseHost| is null, then set |baseHost| to the empty string.
1861+
1. Let |baseHost| be the empty string.
1862+
1. If |baseURL|'s [=url/host=] is not null, then set |baseHost| to its [=host serializer|serialization=].
18631863
1. Set |result|["{{URLPatternInit/hostname}}"] to the result of [=processing a base URL string=] given |baseHost| and |type|.
18641864
1. If |init| [=map/contains=] none of "{{URLPatternInit/protocol}}", "{{URLPatternInit/hostname}}", and "{{URLPatternInit/port}}", then:
18651865
1. If |baseURL|'s [=url/port=] is null, then set |result|["{{URLPatternInit/port}}"] to the empty string.

0 commit comments

Comments
 (0)