Skip to content

Commit 0f86654

Browse files
committed
[fixed] checks for class instead of components
Previously the checks for components were the same as class. This changes in the new version of react. See this issue: facebook/react#1164
1 parent a3d6e2a commit 0f86654

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/components/Route.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ var Route = React.createClass({
105105

106106
propTypes: {
107107
location: React.PropTypes.oneOf([ 'hash', 'history' ]).isRequired,
108-
handler: React.PropTypes.component.isRequired,
108+
handler: React.PropTypes.any.isRequired,
109109
path: React.PropTypes.string,
110110
name: React.PropTypes.string,
111111
},

modules/stores/RouteStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var RouteStore = {
2828

2929
// Make sure the <Route> has a valid React component for a handler.
3030
invariant(
31-
React.isValidComponent(route.props.handler),
31+
React.isValidClass(route.props.handler),
3232
'The handler for Route "' + (route.props.name || route.props.path) + '" ' +
3333
'must be a valid React component'
3434
);

0 commit comments

Comments
 (0)