Skip to content

Commit faa8fd5

Browse files
committed
Style tweaks
1 parent bea0820 commit faa8fd5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

modules/Redirect.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ const Redirect = React.createClass({
2929
let pathname
3030
if (route.to.charAt(0) === '/') {
3131
pathname = formatPattern(route.to, params)
32-
}
33-
else if (!route.to) {
32+
} else if (!route.to) {
3433
pathname = location.pathname
35-
}
36-
else {
34+
} else {
3735
let routeIndex = nextState.routes.indexOf(route)
3836
let parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1)
3937
let pattern = parentPattern.replace(/\/*$/, '/') + route.to
@@ -58,9 +56,8 @@ const Redirect = React.createClass({
5856
let pattern = route.path || ''
5957
parentPattern = pattern.replace(/\/*$/, '/') + parentPattern
6058

61-
if (pattern.indexOf('/') === 0) {
59+
if (pattern.indexOf('/') === 0)
6260
break
63-
}
6461
}
6562

6663
return '/' + parentPattern

0 commit comments

Comments
 (0)