diff --git a/client/src/main.js b/client/src/main.js index c8b2221e..0ec9bfd7 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -141,7 +141,7 @@ function networkErrorCallback(statusCode) { } function joiningClass(to) { - return (to.name === 'join-class' || to.name === 'licenseActivation'); + return to.name && (to.name === 'join-class' || to.name === 'licenseActivation'); } router.beforeEach(async (to, from, next) => { @@ -157,7 +157,7 @@ router.beforeEach(async (to, from, next) => { return; } - if (to.name !== 'licenseActivation' && loginRequired(to) && await redirectUsersWithoutValidLicense()) { + if (to.name && to.name !== 'licenseActivation' && loginRequired(to) && await redirectUsersWithoutValidLicense()) { next({name: 'licenseActivation'}); return; } @@ -167,7 +167,7 @@ router.beforeEach(async (to, from, next) => { return; } - if ((to.name.indexOf('onboarding') === -1) && !joiningClass(to) && loginRequired(to) && await redirectUsersToOnboarding()) { + if ((to.name && to.name.indexOf('onboarding') === -1) && !joiningClass(to) && loginRequired(to) && await redirectUsersToOnboarding()) { next({name: 'onboarding-start'}); return; } diff --git a/client/src/pages/p404.vue b/client/src/pages/p404.vue index a23c668a..9e1ebc3f 100644 --- a/client/src/pages/p404.vue +++ b/client/src/pages/p404.vue @@ -1,5 +1,16 @@ + + diff --git a/client/src/router/index.js b/client/src/router/index.js index 8072402d..44cfb4bf 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -247,7 +247,13 @@ const routes = [ ] }, {path: '/styleguide', component: styleGuidePage}, - {path: '*', component: p404} + { + path: '*', + component: p404, + meta: { + layout: 'blank' + } + } ]; Vue.use(Router);