Skip to content

Commit

Permalink
event handler null check (#2032)
Browse files Browse the repository at this point in the history
## Description

Fixes #2031

## Changes

Added null check in dispatchEvent method after RCTExecuteOnMainQueue.

See issue for further details.
  • Loading branch information
koreus7 authored May 24, 2021
1 parent 7aebe68 commit 824e5df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/REANodesManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ - (void)dispatchEvent:(id<RCTEvent>)event
if (strongSelf == nil) {
return;
}
if (eventHandler == nil) {
return;
}
eventHandler(eventHash, event);
if ([strongSelf isDirectEvent:event]) {
[strongSelf performOperations];
Expand Down

0 comments on commit 824e5df

Please sign in to comment.