Skip to content

Commit d32e9d1

Browse files
committed
Fix type error
input already contains a decoded array which would crash punycode.decode.
1 parent a62ba1d commit d32e9d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ URLStateMachine.prototype["parse" + STATES.RELATIVE] = function parseScheme(c, c
291291
let nextChar = at(this.input, this.pointer + 1);
292292
let nextNextChar = at(this.input, this.pointer + 2);
293293
if (this.url.scheme !== "file" || !isASCIIAlpha(c) || !(nextChar === ":" || nextChar === "|") ||
294-
countSymbols(this.input) - this.pointer === 1 || !(nextNextChar === "/" || nextNextChar === "\\" ||
294+
this.input.length - this.pointer === 1 || !(nextNextChar === "/" || nextNextChar === "\\" ||
295295
nextNextChar === "?" || nextNextChar === "#")) {
296296
this.url.host = this.base.host;
297297
this.url.port = this.base.port;

0 commit comments

Comments
 (0)