Skip to content

Commit 00d60a1

Browse files
nhunzakerryanflorence
authored andcommitted
[fix] PropType warning about handlers in Redirect
1 parent ccd4885 commit 00d60a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/components/Redirect.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ class Redirect extends Route {}
1111
// once we can use ES7 property initializers.
1212
// https://github.com/babel/babel/issues/619
1313

14+
1415
Redirect.propTypes = {
1516
path: PropTypes.string,
1617
from: PropTypes.string, // Alias for path.
1718
to: PropTypes.string,
1819
handler: PropTypes.falsy
1920
};
2021

22+
// Redirects should not have a default handler
23+
Redirect.defaultProps = {}
24+
2125
module.exports = Redirect;

0 commit comments

Comments
 (0)