Look on __reactBoundContext for displayName
Charles Marsh committed
Aug 20, 2014 at 08:44 UTC
0ecc7e5a7f0ea3bdef11e1da3512e2bf47c4d52c
1 file changed
+4
-1
src/browser/eventPlugins/SimpleEventPlugin.js
+4
-1
@@ -312,8 +312,11 @@ var SimpleEventPlugin = {
312
var returnValue = EventPluginUtils.executeDispatch(event, listener, domID);
313
if (__DEV__) {
314
if (typeof returnValue === 'boolean') {
315
+ var eventHandlerName = (listener.__reactBoundContext &&
316
+ listener.__reactBoundContext.constructor.displayName) ||
317
+ '<<anonymous>>';
318
monitorCodeUse('react_event_return_false', {
316
- eventHandlerName: listener.__reactBoundMethod.displayName
319
+ eventHandlerName: eventHandlerName
320
});
321
console.warn(
322
'Returning `false` from an event handler is deprecated and will ' +