Skip to content

Commit

Permalink
[fixed] checks for class instead of components
Browse files Browse the repository at this point in the history
Previously the checks for components were the same as class. This changes in the new version of react. See this issue: facebook/react#1164
  • Loading branch information
zero-is-one committed Jul 14, 2014
1 parent a3d6e2a commit 0f86654
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/components/Route.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ var Route = React.createClass({

propTypes: {
location: React.PropTypes.oneOf([ 'hash', 'history' ]).isRequired,
handler: React.PropTypes.component.isRequired,
handler: React.PropTypes.any.isRequired,
path: React.PropTypes.string,
name: React.PropTypes.string,
},
Expand Down
2 changes: 1 addition & 1 deletion modules/stores/RouteStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var RouteStore = {

// Make sure the <Route> has a valid React component for a handler.
invariant(
React.isValidComponent(route.props.handler),
React.isValidClass(route.props.handler),
'The handler for Route "' + (route.props.name || route.props.path) + '" ' +
'must be a valid React component'
);
Expand Down

0 comments on commit 0f86654

Please sign in to comment.