Use at() instead of charAt()
This commit is contained in:
parent
c23921d0ff
commit
a040b32405
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ function normalizeUrl(url) {
|
|||
if (!url.includes("http://") && !url.includes("https://")) {
|
||||
url = "https://" + url;
|
||||
}
|
||||
if (url.charAt(url.length - 1) !== "/") {
|
||||
if (url.at(-1) !== "/") {
|
||||
url = url + "/";
|
||||
}
|
||||
return url;
|
||||
|
|
Reference in a new issue