Fix bad merge from 04c9820694ac07bb88d3dda32bf35a063c3c61a4
Didn't sync out correctly.
Cheng Lou committed
Aug 18, 2014 at 10:37 UTC
a43d8c588bb9ffb6ea335b27591346308df0c434
1 file changed
+5
-1
src/core/ReactCompositeComponent.js
+5
-1
@@ -466,6 +466,10 @@ function validateLifeCycleOnReplaceState(instance) {
466
* specification keys when building `ReactCompositeComponent` classses.
467
*/
468
function mixSpecIntoComponent(Constructor, spec) {
469
+ if (!spec) {
470
+ return;
471
+ }
472
+
473
invariant(
474
!ReactDescriptor.isValidFactory(spec),
475
'ReactCompositeComponent: You\'re attempting to ' +
@@ -483,7 +487,7 @@ function mixSpecIntoComponent(Constructor, spec) {
487
// chaining order is applied to methods with DEFINE_MANY policy, whether
488
// mixins are listed before or after these methods in the spec.
489
if (spec.hasOwnProperty(MIXINS_KEY)) {
486
- RESERVED_SPEC_KEYS.mixins(ConvenienceConstructor, spec.mixins);
490
+ RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
491
}
492
493
for (var name in spec) {