diff --git a/src/components/DiscussionsList.vue b/src/components/DiscussionsList.vue index f61a0af3..fcd1e04a 100644 --- a/src/components/DiscussionsList.vue +++ b/src/components/DiscussionsList.vue @@ -83,7 +83,7 @@ const getUserAvatar = (post: Post) => { } const triggerLogin = () => { - LocalStorageService.setItem('lastRoute', route) + LocalStorageService.setItem('lastRoute', route.fullPath) router.push({ name: 'login' }) } diff --git a/src/main.ts b/src/main.ts index 931195fe..fff91a3c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -62,7 +62,7 @@ routerPromise // protect authenticated routes const store = useUserStore() if (to.meta.requiresAuth === true && !store.$state.isLoggedIn) { - LocalStorageService.setItem('lastRoute', to) + LocalStorageService.setItem('lastRoute', to.fullPath) void router.push({ name: 'login' }) } // set page title where needed