From ae622c7014cd3e7b7e952c65b506f62717e80247 Mon Sep 17 00:00:00 2001 From: Greg Wilson Date: Tue, 28 Jun 2016 18:33:36 -0400 Subject: [PATCH] changed body_saveWeight method to get weight from value field of options instead of weight field to be consistent --- RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m b/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m index e8520d3..7cef81f 100644 --- a/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m +++ b/RCTAppleHealthKit/RCTAppleHealthKit+Methods_Body.m @@ -39,7 +39,8 @@ - (void)body_saveWeight:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback { - double weight= [[input objectForKey:@"weight"] doubleValue]; +// double weight= [[input objectForKey:@"weight"] doubleValue]; + double weight = [RCTAppleHealthKit doubleValueFromOptions:input]; NSDate *sampleDate = [RCTAppleHealthKit dateFromOptionsDefaultNow:input]; HKUnit *unit = [RCTAppleHealthKit hkUnitFromOptions:input]; -- 2.26.2