prevent undefined is not an Object exception

Reviewed By: sebmarkbage

Differential Revision: D4707119

fbshipit-source-id: 403d7c26a1910d0ed1b980f305aa2b6326f371a2
This commit is contained in:
Daniel Woelfel 2017-03-14 13:08:50 -07:00 committed by Facebook Github Bot
parent 1ca41a56c6
commit 5f8e46b8b4
1 changed files with 3 additions and 0 deletions

View File

@ -147,6 +147,9 @@ var EventPluginHub = {
return null;
}
const props = inst._currentElement.props;
if (!props) {
return null;
}
listener = props[registrationName];
if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, props)) {
return null;