Skip to content

Commit

Permalink
docs: update extending routes at runtime (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
IceyWu authored Sep 17, 2024
1 parent 2126ea0 commit cbe9ce3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guide/extending-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ import { routes } from 'vue-router/auto-routes'
for (const route of routes) {
if (route.name === '/admin') {
adminRoute.meta ??= {}
adminRoute.meta.requiresAuth = true
route.meta ??= {}
route.meta.requiresAuth = true
}
}
Expand Down

0 comments on commit cbe9ce3

Please sign in to comment.