Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | import React from 'react'; |
||
27 | const activeRoute = this.props.routes(path).filter((route) => { |
||
28 | if (route[0] === '*') { |
||
29 | fourOhFour = route; |
||
30 | return false; |
||
31 | } |
||
32 | const hasParams = route[0].match(':'); |
||
33 | if (hasParams) { |
||
34 | const { trueRoute, params } = getParams(route[0], path); |
||
35 | routeParams = params; |
||
36 | return trueRoute === path; |
||
37 | } |
||
38 | return route[0] === path; |
||
39 | }); |
||
40 | |||
64 |