Fix bad merge from 04c9820694

Didn't sync out correctly.
This commit is contained in:
Cheng Lou
2014-08-18 10:37:18 -07:00
parent 196030aeb5
commit a43d8c588b
+5 -1
View File
@@ -466,6 +466,10 @@ function validateLifeCycleOnReplaceState(instance) {
* specification keys when building `ReactCompositeComponent` classses.
*/
function mixSpecIntoComponent(Constructor, spec) {
if (!spec) {
return;
}
invariant(
!ReactDescriptor.isValidFactory(spec),
'ReactCompositeComponent: You\'re attempting to ' +
@@ -483,7 +487,7 @@ function mixSpecIntoComponent(Constructor, spec) {
// chaining order is applied to methods with DEFINE_MANY policy, whether
// mixins are listed before or after these methods in the spec.
if (spec.hasOwnProperty(MIXINS_KEY)) {
RESERVED_SPEC_KEYS.mixins(ConvenienceConstructor, spec.mixins);
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
}
for (var name in spec) {