From 058570c9a78a5882c27c6c8026caaf240856970f Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 10 May 2020 18:26:33 +0200 Subject: [PATCH] Make sure the api url does not have a / at the end --- src/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.js b/src/main.js index 6f02f403..166b06f7 100644 --- a/src/main.js +++ b/src/main.js @@ -5,6 +5,11 @@ import router from './router' import {VERSION} from './version.json' console.info(`Vikunja frontend version ${VERSION}`) +// Make sure the api url does not contain a / at the end +if(window.API_URL.substr(window.API_URL.length - 1, window.API_URL.length) === '/') { + window.API_URL = window.API_URL.substr(0, window.API_URL.length - 1) +} + // Register the modal import Modal from './components/modal/Modal' Vue.component('modal', Modal)