Skip to content

Commit

Permalink
Fixes Android event dispatcher for old arch (#3176)
Browse files Browse the repository at this point in the history
## Description

This is similar to #3166, but for the old arch

## Test plan

Before this change, our app failed to build with RN 0.76.0-rc.6 without the new arch enabled. With this change, it builds and runs correctly.
  • Loading branch information
renchap authored Oct 24, 2024
1 parent 802da49 commit ea341b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.facebook.react.uimanager.events.Event

fun ReactContext.dispatchEvent(event: Event<*>) {
try {
this.getNativeModule(UIManagerModule::class.java)!!.getEventDispatcher().dispatchEvent(event)
this.getNativeModule(UIManagerModule::class.java)!!.eventDispatcher.dispatchEvent(event)
} catch (e: NullPointerException) {
throw Exception("Couldn't get an instance of UIManagerModule. Gesture Handler is unable to send an event.", e)
}
Expand Down

0 comments on commit ea341b8

Please sign in to comment.