Skip to content

Commit

Permalink
fix: missing route data in guard, fixed: #4108 (#4115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan authored Aug 11, 2024
1 parent 7a9ad7d commit 9d6cc22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web-antd/src/router/guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) {
// 保存菜单信息和路由信息
accessStore.setAccessMenus(accessibleMenus);
accessStore.setAccessRoutes(accessibleRoutes);
const redirectPath = (from.query.redirect ?? to.path) as string;
const redirectPath = (from.query.redirect ?? to.fullPath) as string;

return {
path: decodeURIComponent(redirectPath),
...router.resolve(decodeURIComponent(redirectPath)),
replace: true,
};
});
Expand Down

0 comments on commit 9d6cc22

Please sign in to comment.