Skip to content

Commit 1c1305d

Browse files
gengjiawentargos
authored andcommitted
lib: make lowerProto scope more clear
PR-URL: #26562 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent e8412bc commit 1c1305d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/url.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,11 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
249249
}
250250
}
251251

252-
var proto = protocolPattern.exec(rest);
252+
let proto = protocolPattern.exec(rest);
253+
let lowerProto;
253254
if (proto) {
254255
proto = proto[0];
255-
var lowerProto = proto.toLowerCase();
256+
lowerProto = proto.toLowerCase();
256257
this.protocol = lowerProto;
257258
rest = rest.slice(proto.length);
258259
}

0 commit comments

Comments
 (0)