Skip to content

Commit

Permalink
fix: ensure EventDispatcher always receives non-null data from NavVie…
Browse files Browse the repository at this point in the history
…wEvent (#256)
  • Loading branch information
jokerttu authored Sep 10, 2024
1 parent 32dd6b3 commit 0ee4e8a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.bridge.WritableMap;
Expand Down Expand Up @@ -697,6 +698,9 @@ public String getEventName() {

@Override
public WritableMap getEventData() {
if (eventData == null) {
return Arguments.createMap();
}
return eventData;
}
}
Expand Down

0 comments on commit 0ee4e8a

Please sign in to comment.