diff options
author | 2022-11-21 17:37:12 -0800 | |
---|---|---|
committer | 2022-11-21 17:37:12 -0800 | |
commit | ca434fba6e2373cafc04fe75b349ffd3e1c47d74 (patch) | |
tree | 39eea2d3b5c46bd4a9e6526a43f06d2b5f03f69c /src | |
parent | 55f8029dc28a8c8cc1e40daae1e888aea48c4a1a (diff) | |
download | bun-ca434fba6e2373cafc04fe75b349ffd3e1c47d74.tar.gz bun-ca434fba6e2373cafc04fe75b349ffd3e1c47d74.tar.zst bun-ca434fba6e2373cafc04fe75b349ffd3e1c47d74.zip |
make it slightly clearer
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) { |