From a040b32405c732c1dc6d7da9bca59cec5d1885d0 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Sat, 17 Jun 2023 14:08:15 +0200 Subject: [PATCH] Use at() instead of charAt() --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 0d24963..c4cbdd1 100644 --- a/src/main.js +++ b/src/main.js @@ -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;