@sbhjt-gr/react-native-webrtc 137.0.8 → 137.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -218,9 +218,14 @@ public class WebRTCModule extends ReactContextBaseJavaModule {
218
218
  }
219
219
 
220
220
  void sendEvent(String eventName, @Nullable ReadableMap params) {
221
- getReactApplicationContext()
221
+ ReactApplicationContext context = getReactApplicationContext();
222
+ if (!context.hasActiveReactInstance()) {
223
+ return;
224
+ }
225
+ final ReadableMap payload = params;
226
+ context.runOnJSQueueThread(() -> context
222
227
  .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
223
- .emit(eventName, params);
228
+ .emit(eventName, payload));
224
229
  }
225
230
 
226
231
  private PeerConnection.IceServer createIceServer(String url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sbhjt-gr/react-native-webrtc",
3
- "version": "137.0.8",
3
+ "version": "137.0.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/sbhjt-gr/react-native-webrtc.git"