mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
Removed harmful optimization in ReactNativeEventEmitter
Reviewed By: spicyj Differential Revision: D4729779 fbshipit-source-id: 2dd5ec10d42df7f24804796c4100eca107edeedb
This commit is contained in:
parent
47d2cfeac5
commit
23c2a6cf1a
@ -103,11 +103,6 @@ var ReactNativeEventEmitter = {
|
||||
) {
|
||||
var nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT;
|
||||
var inst = ReactNativeComponentTree.getInstanceFromNode(rootNodeID);
|
||||
if (!inst) {
|
||||
// If the original instance is already gone, we don't have to dispatch
|
||||
// any events.
|
||||
return;
|
||||
}
|
||||
ReactGenericBatching.batchedUpdates(function() {
|
||||
ReactNativeEventEmitter.handleTopLevel(
|
||||
topLevelType,
|
||||
|
@ -93,7 +93,7 @@ function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
||||
* requiring that the `dispatchMarker` be the same as the dispatched ID.
|
||||
*/
|
||||
function accumulateDispatches(inst, ignoredDirection, event) {
|
||||
if (event && event.dispatchConfig.registrationName) {
|
||||
if (inst && event && event.dispatchConfig.registrationName) {
|
||||
var registrationName = event.dispatchConfig.registrationName;
|
||||
var listener = getListener(inst, registrationName);
|
||||
if (listener) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user