@samitouri / QOS-React / commits / 87607045e4

Abbreviated error message

Charles Marsh committed Aug 13, 2014 at 18:25 UTC 87607045e443e54e9f4f79122572686265dde3a9
2 files changed +8 -12
src/core/ReactCompositeComponent.js
+4 -6
@@ -592,12 +592,10 @@ function mergeObjectsWithNoDuplicateKeys(one, two) {
592 invariant(
593 one[key] === undefined,
594 'mergeObjectsWithNoDuplicateKeys(): ' +
595 - 'Tried to merge two objects with the same key: `%s`. ' +
596 - 'This conflict may be due to a mixin; in particular, you may be using ' +
597 - 'a mixin with its own getDefaultProps() or getInitialState(). This ' +
598 - 'could result in both the mixin and base component (or another mixin) ' +
599 - 'returning an object (either from getDefaultProps() or ' +
600 - 'getInitialState()) with the same key.',
595 + 'Tried to merge two objects with the same key: `%s`. This conflict ' +
596 + 'may be due to a mixin; in particular, this may be caused by two ' +
597 + 'getInitialState() or getDefaultProps() methods returning objects ' +
598 + 'with clashing keys.',
599 key
600 );
601 one[key] = value;
src/core/__tests__/ReactCompositeComponent-test.js
+4 -6
@@ -688,12 +688,10 @@ describe('ReactCompositeComponent', function() {
688 instance = ReactTestUtils.renderIntoDocument(instance);
689 }).toThrow(
690 'Invariant Violation: mergeObjectsWithNoDuplicateKeys(): ' +
691 - 'Tried to merge two objects with the same key: `x`. ' +
692 - 'This conflict may be due to a mixin; in particular, you may be using ' +
693 - 'a mixin with its own getDefaultProps() or getInitialState(). This ' +
694 - 'could result in both the mixin and base component (or another mixin) ' +
695 - 'returning an object (either from getDefaultProps() or ' +
696 - 'getInitialState()) with the same key.'
691 + 'Tried to merge two objects with the same key: `x`. This conflict ' +
692 + 'may be due to a mixin; in particular, this may be caused by two ' +
693 + 'getInitialState() or getDefaultProps() methods returning objects ' +
694 + 'with clashing keys.'
695 );
696 });
697