diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/url.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/url.zig b/src/url.zig index f51c8cc55..34979df3f 100644 --- a/src/url.zig +++ b/src/url.zig @@ -228,7 +228,9 @@ pub const URL = struct { offset += url.parseProtocol(base[offset..]) orelse 0; } - if (!(!is_protocol_relative and base[0] == '/')) { + const is_relative_path = !is_protocol_relative and base[0] == '/'; + + if (!is_relative_path) { // if there's no protocol or @, it's ambiguous whether the colon is a port or a username. if (offset > 0) { |