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 and m-bert committed Oct 24, 2024
1 parent 1529a6e commit 9bf096f
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 9bf096f

Please sign in to comment.