(isAlreadyDefined, name)
| 4781 | } |
| 4782 | |
| 4783 | function validateMethodOverride(isAlreadyDefined, name) { |
| 4784 | var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; |
| 4785 | |
| 4786 | // Disallow overriding of base class methods unless explicitly allowed. |
| 4787 | if (ReactClassMixin.hasOwnProperty(name)) { |
| 4788 | !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(false) : void 0; |
| 4789 | } |
| 4790 | |
| 4791 | // Disallow defining methods more than once unless explicitly allowed. |
| 4792 | if (isAlreadyDefined) { |
| 4793 | !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(false) : void 0; |
| 4794 | } |
| 4795 | } |
| 4796 | |
| 4797 | /** |
| 4798 | * Mixin helper which handles policy validation and reserved |
no test coverage detected
searching dependent graphs…