@didomi/react-native 2.10.0 → 2.10.1

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.
@@ -130,5 +130,5 @@ dependencies {
130
130
 
131
131
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
132
132
 
133
- implementation "io.didomi.sdk:android:2.19.0"
133
+ implementation "io.didomi.sdk:android:2.19.1"
134
134
  }
@@ -268,7 +268,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
268
268
  val set = mutableSetOf<String>()
269
269
 
270
270
  for (i in 0 until size()) {
271
- set.add(getString(i))
271
+ getString(i)?.also { set.add(it) }
272
272
  }
273
273
 
274
274
  return set
@@ -1178,9 +1178,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
1178
1178
  }
1179
1179
 
1180
1180
  // Required to transform from array to variadic.
1181
- private fun readableArrayToStringArray(readableArray: ReadableArray): Array<String> {
1182
- return Array(readableArray.size()) { i -> readableArray.getString(i) }
1183
- }
1181
+ private fun readableArrayToStringArray(readableArray: ReadableArray) = readableArray.toSet().toTypedArray()
1184
1182
 
1185
1183
  private fun buildDidomiInitializeParameters(jsonParameters: String): DidomiInitializeParameters {
1186
1184
  val jsonObject = JSONObject(jsonParameters)
@@ -7,5 +7,5 @@ exports.DIDOMI_VERSION = exports.DIDOMI_USER_AGENT_NAME = void 0;
7
7
  // User agent name
8
8
  const DIDOMI_USER_AGENT_NAME = exports.DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK";
9
9
  // User agent version
10
- const DIDOMI_VERSION = exports.DIDOMI_VERSION = "2.10.0";
10
+ const DIDOMI_VERSION = exports.DIDOMI_VERSION = "2.10.1";
11
11
  //# sourceMappingURL=Constants.js.map
@@ -3,5 +3,5 @@
3
3
  // User agent name
4
4
  export const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK";
5
5
  // User agent version
6
- export const DIDOMI_VERSION = "2.10.0";
6
+ export const DIDOMI_VERSION = "2.10.1";
7
7
  //# sourceMappingURL=Constants.js.map
@@ -1,3 +1,3 @@
1
1
  export declare const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK";
2
- export declare const DIDOMI_VERSION = "2.10.0";
2
+ export declare const DIDOMI_VERSION = "2.10.1";
3
3
  //# sourceMappingURL=Constants.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didomi/react-native",
3
- "version": "2.10.0",
3
+ "version": "2.10.1",
4
4
  "description": "Didomi React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
17
17
 
18
18
  s.dependency "React-Core"
19
- s.dependency "Didomi-XCFramework", "2.19.0"
19
+ s.dependency "Didomi-XCFramework", "2.19.1"
20
20
  end
package/src/Constants.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  // User agent name
2
2
  export const DIDOMI_USER_AGENT_NAME = "Didomi React-Native SDK"
3
3
  // User agent version
4
- export const DIDOMI_VERSION = "2.10.0"
4
+ export const DIDOMI_VERSION = "2.10.1"