chore: improve checking for API url '/' suffix (#121)

This commit is contained in:
DIMITRIOS CHRYSOCHERIS 2023-08-23 22:56:08 +03:00 committed by GitHub
parent cade3df3e9
commit 311b1d7594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@ if (apiUrlFromStorage !== null) {
}
// Make sure the api url does not contain a / at the end
if (window.API_URL.slice(window.API_URL.length - 1, window.API_URL.length) === '/') {
window.API_URL = window.API_URL.slice(0, window.API_URL.length - 1)
if (window.API_URL.endsWith('/')) {
window.API_URL = window.API_URL.slice(0, -1);
}
// directives