Skip to content

Commit 5eeedc8

Browse files
committed
fixup! url: remove unused code from autoEscapeStr
1 parent 2333e4c commit 5eeedc8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/url.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,9 @@ function autoEscapeStr(rest) {
536536
break;
537537
}
538538
}
539+
if (lastEscapedPos === 0) // Nothing has been escaped.
540+
return rest;
541+
539542
// There are ordinary characters at the end.
540543
if (lastEscapedPos < rest.length)
541544
escaped += rest.slice(lastEscapedPos);

0 commit comments

Comments
 (0)