Skip to content

Commit d768c5c

Browse files
committed
lib: make lowerProto scope more clear
1 parent 4bd2635 commit d768c5c

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
@@ -250,10 +250,11 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
250250
}
251251
}
252252

253-
var proto = protocolPattern.exec(rest);
253+
let proto = protocolPattern.exec(rest);
254+
let lowerProto;
254255
if (proto) {
255256
proto = proto[0];
256-
var lowerProto = proto.toLowerCase();
257+
lowerProto = proto.toLowerCase();
257258
this.protocol = lowerProto;
258259
rest = rest.slice(proto.length);
259260
}

0 commit comments

Comments
 (0)