From 0f86654091d0efbc951c6d8b11ac6f6369e8a323 Mon Sep 17 00:00:00 2001 From: Luke BrownGold Date: Mon, 14 Jul 2014 13:16:58 -0400 Subject: [PATCH] [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: https://github.com/facebook/react/issues/1164 --- modules/components/Route.js | 2 +- modules/stores/RouteStore.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/components/Route.js b/modules/components/Route.js index e314d159fd..a6938b85dc 100644 --- a/modules/components/Route.js +++ b/modules/components/Route.js @@ -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, }, diff --git a/modules/stores/RouteStore.js b/modules/stores/RouteStore.js index 8ee1b2bea6..486cb882b5 100644 --- a/modules/stores/RouteStore.js +++ b/modules/stores/RouteStore.js @@ -28,7 +28,7 @@ var RouteStore = { // Make sure the 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' );