(route)
| 30 | } |
| 31 | |
| 32 | function hasAccessToSection (route) { |
| 33 | const visibleChildren = route.children.filter(child => !child.hidden) |
| 34 | if (visibleChildren.length === 0) { |
| 35 | return false |
| 36 | } |
| 37 | const redirect = '/' + visibleChildren[0].meta.name |
| 38 | if (redirect !== route.path) { |
| 39 | route.redirect = redirect |
| 40 | } |
| 41 | return true |
| 42 | } |
| 43 | |
| 44 | function filterAsyncRouter (routerMap, apis) { |
| 45 | const accessedRouters = routerMap.filter(route => { |
no test coverage detected