Skip to content

Commit 21850d3

Browse files
authored
Fix login redirect (#802)
1 parent 9f65025 commit 21850d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/zudoku/src/lib/core/RouteGuard.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ export const RouteGuard = () => {
1818
const navigate = useNavigate();
1919
const location = useLocation();
2020
const latestPath = useLatest(location.pathname);
21+
const { protectedRoutes = [] } = zudoku.options;
2122

22-
const isProtected = zudoku.options.protectedRoutes?.some((path) =>
23+
const isProtected = protectedRoutes.some((path) =>
2324
matchPath({ path, end: true }, location.pathname),
2425
);
2526

0 commit comments

Comments
 (0)