fix functions existing and delete
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user