Fix possibly undefined type error

This commit is contained in:
Matthias 2021-06-28 19:31:05 +02:00
parent 921ca26688
commit 096c962607

View File

@ -72,7 +72,7 @@ router.beforeEach((to, from, next) => {
// No login if already logged in
next({ path: '/' });
}
if (!to.meta.allowAnonymous && !userService.loggedIn()) {
if (!to.meta?.allowAnonymous && !userService.loggedIn()) {
// Forward to login if login is required
next({
path: '/login',