diff --git a/src/vendor/core/warning.js b/src/vendor/core/warning.js index 5321055edb..9a2bec313d 100644 --- a/src/vendor/core/warning.js +++ b/src/vendor/core/warning.js @@ -33,7 +33,14 @@ if (__DEV__) { if (!condition) { var argIndex = 0; - console.warn('Warning: ' + format.replace(/%s/g, () => args[argIndex++])); + var message = 'Warning: ' + format.replace(/%s/g, () => args[argIndex++]); + console.warn(message); + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} } }; }