fix loginu

This commit is contained in:
2023-09-16 20:18:03 +02:00
parent 7c0accbbce
commit bc5384e747
8 changed files with 29 additions and 16 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ app.mount('#app');
router.beforeEach((to, from, next) => {
const store = useStore();
if (to.meta.protected && !store.user) {
if (to.meta.protected && !store.user && !window.localStorage.getItem('user')) {
next('/login');
return;
}