react-native-health-connect 2.0.0 → 2.0.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.
|
@@ -287,8 +287,8 @@ fun getEnergyFromJsMap(energyMap: ReadableMap?): Energy {
|
|
|
287
287
|
|
|
288
288
|
val value = energyMap.getDouble("value")
|
|
289
289
|
return when (energyMap.getString("unit")) {
|
|
290
|
-
"kilojoules" -> Energy.
|
|
291
|
-
"kilocalories" -> Energy.
|
|
290
|
+
"kilojoules" -> Energy.kilojoules(value)
|
|
291
|
+
"kilocalories" -> Energy.kilocalories(value)
|
|
292
292
|
"joules" -> Energy.joules(value)
|
|
293
293
|
"calories" -> Energy.calories(value)
|
|
294
294
|
else -> Energy.calories(value)
|