Skip to content

Commit

Permalink
📝 fix example bug in doc demo (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyuhan2016 authored Sep 22, 2022
1 parent 07bd541 commit 3a36538
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/faq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,10 @@ const childrenPath = ['/app1', '/app2'];
router.beforeEach((to, from, next) => {
if (to.name) {
// There is a name attribute, indicating that it is the route of the main project
next();
return next();
}
if (childrenPath.some((item) => to.path.includes(item))) {
next();
return next();
}
next({ name: '404' });
});
Expand Down
4 changes: 2 additions & 2 deletions docs/faq/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,10 @@ const childrenPath = ['/app1', '/app2'];
router.beforeEach((to, from, next) => {
if (to.name) {
// 有 name 属性,说明是主应用的路由
next();
return next();
}
if (childrenPath.some((item) => to.path.includes(item))) {
next();
return next();
}
next({ name: '404' });
});
Expand Down

1 comment on commit 3a36538

@vercel
Copy link

@vercel vercel bot commented on 3a36538 Sep 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.