Skip to content

Commit 5864531

Browse files
committed
[changed] Default <Redirect from> to *
Fixes #242
1 parent 1064881 commit 5864531

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/components/Redirect.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ function createRedirectHandler(to) {
1717

1818
/**
1919
* A <Redirect> component is a special kind of <Route> that always
20-
* redirects when it matches.
20+
* redirects to another route when it matches.
2121
*/
2222
function Redirect(props) {
2323
return Route({
2424
name: props.name,
25-
path: props.from || props.path,
25+
path: props.from || props.path || '*',
2626
handler: createRedirectHandler(props.to)
2727
});
2828
}

0 commit comments

Comments
 (0)