summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.js')
-rw-r--r--lib/url.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.js b/lib/url.js
index 6ffec081f6..7db23bf48a 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -413,7 +413,7 @@ function validateHostname(self, rest, hostname) {
}
// Invalid host character
self.hostname = hostname.slice(0, i);
- if (i < hostname.length - 1)
+ if (i < hostname.length)
return '/' + hostname.slice(i) + rest;
break;
}