Make sure the api url does not have a / at the end

This commit is contained in:
kolaente 2020-05-10 18:26:33 +02:00
parent f524a3efc1
commit 058570c9a7
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -5,6 +5,11 @@ import router from './router'
import {VERSION} from './version.json' import {VERSION} from './version.json'
console.info(`Vikunja frontend version ${VERSION}`) 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 // Register the modal
import Modal from './components/modal/Modal' import Modal from './components/modal/Modal'
Vue.component('modal', Modal) Vue.component('modal', Modal)