Skip to content

Commit

Permalink
ReactEventEmitter null fix (#44394)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44394

Lint fix - flip to a guaranteed non-null value instead of the nullable field

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D56898951

fbshipit-source-id: 8740ed77d71a827c7ce80b2df941d24985339619
  • Loading branch information
Thomas Nardone authored and facebook-github-bot committed May 7, 2024
1 parent 3f59d53 commit c7dcdc1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ public void receiveEvent(
customCoalesceKey,
event,
category);
} else if (uiManagerType == UIManagerType.DEFAULT && getDefaultEventEmitter() != null) {
mDefaultEventEmitter.receiveEvent(targetReactTag, eventName, event);
} else if (uiManagerType == UIManagerType.DEFAULT) {
RCTEventEmitter defaultEmitter = getDefaultEventEmitter();
if (defaultEmitter != null) {
defaultEmitter.receiveEvent(targetReactTag, eventName, event);
}
} else {
ReactSoftExceptionLogger.logSoftException(
TAG,
Expand Down

0 comments on commit c7dcdc1

Please sign in to comment.