mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Look on __reactBoundContext for displayName
This commit is contained in:
@@ -312,8 +312,11 @@ var SimpleEventPlugin = {
|
||||
var returnValue = EventPluginUtils.executeDispatch(event, listener, domID);
|
||||
if (__DEV__) {
|
||||
if (typeof returnValue === 'boolean') {
|
||||
var eventHandlerName = (listener.__reactBoundContext &&
|
||||
listener.__reactBoundContext.constructor.displayName) ||
|
||||
'<<anonymous>>';
|
||||
monitorCodeUse('react_event_return_false', {
|
||||
eventHandlerName: listener.__reactBoundMethod.displayName
|
||||
eventHandlerName: eventHandlerName
|
||||
});
|
||||
console.warn(
|
||||
'Returning `false` from an event handler is deprecated and will ' +
|
||||
|
||||
Reference in New Issue
Block a user