File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
packages/core/android/src/main/kotlin/com/datadog/reactnative Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -230,3 +230,15 @@ internal fun ReadableMap.getBooleanOrNull(key: String): Boolean? {
230
230
null
231
231
}
232
232
}
233
+
234
+ /* *
235
+ * Returns the double for the given key, or null if the entry is
236
+ * not in the map.
237
+ */
238
+ internal fun ReadableMap.getDoubleOrNull (key : String ): Double? {
239
+ return if (hasKey(key)) {
240
+ getDouble(key)
241
+ } else {
242
+ null
243
+ }
244
+ }
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ internal fun ReadableMap.asDdSdkConfiguration(): DdSdkConfiguration {
49
49
bundleLogsWithTraces = getBoolean(" bundleLogsWithTraces" ),
50
50
trackNonFatalAnrs = getBooleanOrNull(" trackNonFatalAnrs" ),
51
51
batchProcessingLevel = getString(" batchProcessingLevel" ),
52
- initialResourceThreshold = getDouble (" initialResourceThreshold" )
52
+ initialResourceThreshold = getDoubleOrNull (" initialResourceThreshold" )
53
53
)
54
54
}
55
55
You can’t perform that action at this time.
0 commit comments