From 8f6bae21fbe3640b8086135a71cd0c86f390114b Mon Sep 17 00:00:00 2001 From: Teodor Szente Date: Thu, 9 Apr 2015 19:29:25 +0300 Subject: [PATCH 1/2] check if type.prototype is object --- src/core/instantiateReactComponent.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/instantiateReactComponent.js b/src/core/instantiateReactComponent.js index 69732ce2bb9..e15a8899442 100644 --- a/src/core/instantiateReactComponent.js +++ b/src/core/instantiateReactComponent.js @@ -40,6 +40,7 @@ assign( function isInternalComponentType(type) { return ( typeof type === 'function' && + typeof type.prototype === 'object' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function' ); From cdd359b71020fff5efd09c8e64e3fd468cbed8e5 Mon Sep 17 00:00:00 2001 From: Teodor Szente Date: Thu, 9 Apr 2015 20:12:22 +0300 Subject: [PATCH 2/2] check if is undefined --- src/core/instantiateReactComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/instantiateReactComponent.js b/src/core/instantiateReactComponent.js index e15a8899442..1348dbaf905 100644 --- a/src/core/instantiateReactComponent.js +++ b/src/core/instantiateReactComponent.js @@ -40,7 +40,7 @@ assign( function isInternalComponentType(type) { return ( typeof type === 'function' && - typeof type.prototype === 'object' && + typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function' );