Skip to content

Commit

Permalink
fix: incorrect route
Browse files Browse the repository at this point in the history
  • Loading branch information
ChingCdesu committed Sep 30, 2023
1 parent 9468ab8 commit 99918b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "supernode-frontend",
"private": true,
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
10 changes: 7 additions & 3 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ router.beforeEach((to, from, next) => {
if (isExpired.value) {
return { path: "/login" };
} else {
getMe().catch(() => {
next({ path: "/login" });
});
getMe()
.then(() => {
next();
})
.catch(() => {
next({ path: "/login" });
});
}
});

Expand Down

0 comments on commit 99918b9

Please sign in to comment.