Use endsWith for readability
This commit is contained in:
parent
3e20ea5b2e
commit
bfed1475bb
3 changed files with 3 additions and 3 deletions
|
@ -53,5 +53,5 @@ export default function load() {
|
|||
}
|
||||
|
||||
function normalizeUrl(url: string) {
|
||||
return url[url.length - 1] === '/' ? url.substr(0, url.length - 1) : url;
|
||||
return url.endsWith('/') ? url.substr(0, url.length - 1) : url;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue