diff --git a/frontend/src/api/utils.js b/frontend/src/api/utils.js index b995bcb8..87d6a243 100644 --- a/frontend/src/api/utils.js +++ b/frontend/src/api/utils.js @@ -63,7 +63,7 @@ export function removePrefix(url) { export function createURL(endpoint, params = {}, auth = true) { let prefix = baseURL; - if (prefix[prefix.length] !== "/") { + if (!prefix.endsWith("/")) { prefix = prefix + "/"; } const url = new URL(prefix + encodePath(endpoint), origin);