File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
android/src/main/java/com/freeraspreactnative Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,22 @@ class FreeraspReactNativeModule(val reactContext: ReactApplicationContext) :
9191 val certificateHashes = mutableListOf<String >()
9292 val hashes = androidConfig.getArray(" certificateHashes" )!!
9393 for (i in 0 until hashes.size()) {
94- certificateHashes.add(hashes.getString(i))
94+ // in RN versions < 0.63, getString is nullable
95+ @Suppress(" UNNECESSARY_SAFE_CALL" )
96+ hashes.getString(i)?.let {
97+ certificateHashes.add(it)
98+ }
9599 }
96100 val watcherMail = config.getString(" watcherMail" )
97101 val alternativeStores = mutableListOf<String >()
98102 if (androidConfig.hasKey(" supportedAlternativeStores" )) {
99103 val stores = androidConfig.getArray(" supportedAlternativeStores" )!!
100104 for (i in 0 until stores.size()) {
101- alternativeStores.add(stores.getString(i))
105+ // in RN versions < 0.63, getString is nullable
106+ @Suppress(" UNNECESSARY_SAFE_CALL" )
107+ stores.getString(i)?.let {
108+ alternativeStores.add(it)
109+ }
102110 }
103111 }
104112 var isProd = true
You can’t perform that action at this time.
0 commit comments