Skip to content

Commit 34c3ac4

Browse files
WoLewickicipolleschi
authored andcommitted
feat: add if for better mimicing of the original method
1 parent ee0590e commit 34c3ac4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-native/React/CoreModules/RCTEventDispatcher.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ - (void)_notifyEventDispatcherObserversOfEvent_DEPRECATED:(NSNotification *)noti
235235
{
236236
NSDictionary *userInfo = notification.userInfo;
237237
id<RCTEvent> event = [userInfo objectForKey:@"event"];
238-
[self notifyObserversOfEvent:event];
238+
if (event) {
239+
[self notifyObserversOfEvent:event];
240+
}
239241
}
240242

241243
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:

0 commit comments

Comments
 (0)