🐞 bugfix for non-existant env.js

ref #3
This commit is contained in:
Philipp Dormann 2021-03-05 18:47:15 +01:00
parent c92d5bf5f2
commit 987ac4d02c
1 changed files with 11 additions and 11 deletions

View File

@ -28,17 +28,17 @@ const Privacy = import('./components/Privacy.vue');
const Register = import('./components/Register.vue');
const Profile = import('./components/Profile.vue');
//
let routes = [];
if (config.baseurl && config.documentserver_key) {
routes = [
{ path: '/', component: Home },
{ path: '/imprint', component: Imprint },
{ path: '/privacy', component: Privacy },
{ path: '/register', component: Register },
{ path: '/profile', component: Profile }
];
} else {
routes = [ { path: '/', component: EnvError } ];
let routes = [ { path: '/', component: EnvError } ];
if (typeof config !== 'undefined') {
if (config.baseurl && config.documentserver_key) {
routes = [
{ path: '/', component: Home },
{ path: '/imprint', component: Imprint },
{ path: '/privacy', component: Privacy },
{ path: '/register', component: Register },
{ path: '/profile', component: Profile }
];
}
}
const router = createRouter({
history: createWebHistory(),