diff --git a/package.json b/package.json index d761a510..8f17d3e8 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "vue-grid-layout": "^2.3.12", "vue-material-design-icons": "^4.12.1", "vue-property-decorator": "^9.1.2", - "vue-router": "^3.5.1", + "vue-router": "^3.5.2", "vuex": "^3.6.2", "vuex-class": "^0.3.2" }, diff --git a/src/router/index.ts b/src/router/index.ts index 5ace1ffa..a11ac593 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -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', diff --git a/yarn.lock b/yarn.lock index 79963058..fa8eece5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10829,10 +10829,10 @@ vue-property-decorator@^9.1.2: resolved "https://registry.yarnpkg.com/vue-property-decorator/-/vue-property-decorator-9.1.2.tgz#266a2eac61ba6527e2e68a6933cfb98fddab5457" integrity sha512-xYA8MkZynPBGd/w5QFJ2d/NM0z/YeegMqYTphy7NJQXbZcuU6FC6AOdUAcy4SXP+YnkerC6AfH+ldg7PDk9ESQ== -vue-router@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.5.1.tgz#edf3cf4907952d1e0583e079237220c5ff6eb6c9" - integrity sha512-RRQNLT8Mzr8z7eL4p7BtKvRaTSGdCbTy2+Mm5HTJvLGYSSeG9gDzNasJPP/yOYKLy+/cLG/ftrqq5fvkFwBJEw== +vue-router@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c" + integrity sha512-807gn82hTnjCYGrnF3eNmIw/dk7/GE4B5h69BlyCK9KHASwSloD1Sjcn06zg9fVG4fYH2DrsNBZkpLtb25WtaQ== vue-style-loader@^4.1.0, vue-style-loader@^4.1.2: version "4.1.3"