Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,15 @@ internal fun ReadableMap.getBooleanOrNull(key: String): Boolean? {
null
}
}

/**
* Returns the double for the given key, or null if the entry is
* not in the map.
*/
internal fun ReadableMap.getDoubleOrNull(key: String): Double? {
return if (hasKey(key)) {
getDouble(key)
} else {
null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal fun ReadableMap.asDdSdkConfiguration(): DdSdkConfiguration {
bundleLogsWithTraces = getBoolean("bundleLogsWithTraces"),
trackNonFatalAnrs = getBooleanOrNull("trackNonFatalAnrs"),
batchProcessingLevel = getString("batchProcessingLevel"),
initialResourceThreshold = getDouble("initialResourceThreshold")
initialResourceThreshold = getDoubleOrNull("initialResourceThreshold")
)
}

Expand Down
Loading