From d2407c73fb61aea3b06707a231abc57efbc1b099 Mon Sep 17 00:00:00 2001 From: Swaroop SM Date: Tue, 1 Mar 2016 23:44:01 +0530 Subject: [PATCH] Warn if the included mixin is undefined --- src/isomorphic/classic/class/ReactClass.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/isomorphic/classic/class/ReactClass.js b/src/isomorphic/classic/class/ReactClass.js index 223e58bf63187..9f123661e197f 100644 --- a/src/isomorphic/classic/class/ReactClass.js +++ b/src/isomorphic/classic/class/ReactClass.js @@ -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; }