Skip to content

Commit

Permalink
Warn if the included mixin is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Swaroop SM committed Mar 1, 2016
1 parent 56c423a commit d2407c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/isomorphic/classic/class/ReactClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ function validateMethodOverride(isAlreadyDefined, name) {
*/
function mixSpecIntoComponent(Constructor, spec) {
if (!spec) {
warning(
typeof spec === 'undefined',
'%s: You\'re attempting to ' +
'include a mixin that is undefined.',
Constructor.displayName || 'ReactClass'
);
return;
}

Expand Down

0 comments on commit d2407c7

Please sign in to comment.