Total Complexity | 3 |
Complexity/F | 1.5 |
Lines of Code | 23 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import Dashboard from './components/Dashboard'; |
||
2 | |||
3 | Nova.booting((Vue, router) => { |
||
|
|||
4 | router.beforeEach((to, from, next) => { |
||
5 | /** |
||
6 | * Load the dashboard using our custom route. |
||
7 | */ |
||
8 | if (to.name == 'dashboard' && to.path == '/') { |
||
9 | next('/dashboards/main'); |
||
10 | } |
||
11 | |||
12 | next(); |
||
13 | }); |
||
14 | |||
15 | router.addRoutes([ |
||
16 | { |
||
17 | name: 'dashboard.custom', |
||
18 | path: '/dashboards/:dashboardName', |
||
19 | component: Dashboard, |
||
20 | props: true, |
||
21 | }, |
||
22 | ]) |
||
23 | }) |
||
24 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.