@samitouri / QOS-React-2 / commits / 5c51f2fe46

Check if a function has a prototype first

Because somehow someone used a prototype less function with JSX.

Sebastian Markbage committed Aug 19, 2014 at 23:16 UTC 5c51f2fe4612bd2499f830382dafebac85a661d3
1 file changed +1
src/core/ReactLegacyDescriptor.js
+1
@@ -49,6 +49,7 @@ function warnForLegacyFactoryCall() {
49
50 function warnForPlainFunctionType(type) {
51 var isReactClass =
52 + type.prototype &&
53 typeof type.prototype.mountComponent === 'function' &&
54 typeof type.prototype.receiveComponent === 'function';
55 if (isReactClass) {