react-native-firework-sdk 2.16.0 → 2.16.2

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.
@@ -1,6 +1,5 @@
1
1
  package com.fireworksdk.bridge.reactnative.manager
2
2
 
3
- import android.app.Activity
4
3
  import com.facebook.react.bridge.ReadableArray
5
4
  import com.facebook.react.bridge.ReadableMap
6
5
  import com.facebook.react.uimanager.SimpleViewManager
@@ -38,7 +37,8 @@ class FWVideoFeedManager : SimpleViewManager<FWVideoFeed>() {
38
37
 
39
38
  override fun createViewInstance(reactContext: ThemedReactContext): FWVideoFeed {
40
39
  this.reactContext = reactContext
41
- videoFeed = FWVideoFeed(reactContext.currentActivity as Activity)
40
+ // MS-1250: Fix potential crash when reactContext.currentActivity is null
41
+ videoFeed = FWVideoFeed(reactContext.currentActivity ?: reactContext)
42
42
  addVideoFeedListener(reactContext, videoFeed)
43
43
  return videoFeed
44
44
  }
@@ -236,7 +236,7 @@ class FWVideoFeedManager : SimpleViewManager<FWVideoFeed>() {
236
236
  }
237
237
 
238
238
 
239
- override fun getCommandsMap(): MutableMap<String, Int> {
239
+ override fun getCommandsMap(): MutableMap<String, Int> {
240
240
  val map: MutableMap<String, Int> = HashMap()
241
241
  map["refresh"] = COMMAND_REFRESH
242
242
  return map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.16.0",
3
+ "version": "2.16.2",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -34,5 +34,5 @@ fi
34
34
 
35
35
  s.dependency 'React-Core'
36
36
  s.dependency 'FireworkVideoUI', '0.2.15'
37
- s.dependency 'FireworkVideo', '1.30.0'
37
+ s.dependency 'FireworkVideo', '1.30.2'
38
38
  end