lib: make lowerProto scope more clear · nodejs/node@1c1305d (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 1c1305d
authored and
committed
lib: make lowerProto scope more clear
PR-URL: #26562Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Reviewed-By: Luigi Pinca luigipinca@gmail.com
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -249,10 +249,11 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { | ||
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
252 | -var proto = protocolPattern.exec(rest); | |
252 | +let proto = protocolPattern.exec(rest); | |
253 | +let lowerProto; | |
253 | 254 | if (proto) { |
254 | 255 | proto = proto[0]; |
255 | -var lowerProto = proto.toLowerCase(); | |
256 | +lowerProto = proto.toLowerCase(); | |
256 | 257 | this.protocol = lowerProto; |
257 | 258 | rest = rest.slice(proto.length); |
258 | 259 | } |