Skip to content

Commit 97c55fb

Browse files
authored
Replace substr with slice for URL manipulation (#538)
Signed-off-by: Aras Abbasi <[email protected]>
1 parent cec0bef commit 97c55fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ function getRedirectUrl (url) {
571571
if (url[i] !== '/' && url[i] !== '\\') break
572572
}
573573
// turns all leading / or \ into a single /
574-
url = '/' + url.substr(i)
574+
url = '/' + url.slice(i)
575575
try {
576576
const parsed = new URL(url, 'http://localhost.com/')
577577
const parsedPathname = parsed.pathname

0 commit comments

Comments
 (0)