fix functions existing and delete

This commit is contained in:
Adrian Zürcher
2025-11-07 08:34:53 +01:00
parent aba4bafb65
commit db96732a62
6 changed files with 14 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ export default boot(async ({ router }) => {
// Restore logic after router is ready but before navigation
router.isReady().then(() => {
const lastRoute = sessionStorage.getItem('lastRoute');
const lastRoute = localStorage.getItem('lastRoute');
const currentPath = router.currentRoute.value.fullPath;
// Restore only if:
@@ -26,7 +26,7 @@ export default boot(async ({ router }) => {
router.afterEach((to) => {
// Don't save login page as "last route"
if (to.path !== '/login' && to.path !== '/') {
sessionStorage.setItem('lastRoute', to.fullPath);
localStorage.setItem('lastRoute', to.fullPath);
}
});
});