Flip the warning condition in ReactDebugTool and ReactDOMDebugTool
The current warning condition caused the first error to be swallowed, and all the next errors to be logged. I believe the intention was the opposite: to log the first error, and to ignore any next errors for the same method.
Dan Abramov committed
Apr 25, 2016 at 00:41 UTC
1f97103d7b782600eba4763d6918f826d705b6c9
2 files changed
+2
-2
src/isomorphic/ReactDebugTool.js
+1
-1
@@ -26,7 +26,7 @@ function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
26
}
27
} catch (e) {
28
warning(
29
- !handlerDoesThrowForEvent[handlerFunctionName],
29
+ handlerDoesThrowForEvent[handlerFunctionName],
30
'exception thrown by devtool while handling %s: %s',
31
handlerFunctionName,
32
e.message
src/renderers/dom/shared/ReactDOMDebugTool.js
+1
-1
@@ -27,7 +27,7 @@ function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
27
}
28
} catch (e) {
29
warning(
30
- !handlerDoesThrowForEvent[handlerFunctionName],
30
+ handlerDoesThrowForEvent[handlerFunctionName],
31
'exception thrown by devtool while handling %s: %s',
32
handlerFunctionName,
33
e.message