@samitouri / QOS-React / commits / 22a8f9964e

Don't try to get the target node for responder if there is no listener

This can happen in edge cases where he listeners are already unmounted or not mounted yet or something.

Sebastian Markbage committed Apr 13, 2016 at 13:29 UTC 22a8f9964ea4095f4ede4fef0e65f3576ffe9b4a
1 file changed +1 -1
src/renderers/shared/event/EventPluginUtils.js
+1 -1
@@ -204,7 +204,7 @@ function executeDirectDispatch(event) {
204 !Array.isArray(dispatchListener),
205 'executeDirectDispatch(...): Invalid `event`.'
206 );
207 - event.currentTarget = EventPluginUtils.getNodeFromInstance(dispatchInstance);
207 + event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
208 var res = dispatchListener ? dispatchListener(event) : null;
209 event.currentTarget = null;
210 event._dispatchListeners = null;