Commit 4348c1a8 authored by Daniele Volpi's avatar Daniele Volpi Committed by Micheil (Em) Smith

fix: data array for cumulative stats is empty

parent a6205b95
......@@ -423,7 +423,7 @@
[RCTAppleHealthKit reverseNSMutableArray:data];
}
if(lim > 0) {
if((lim > 0) && ([data count] > lim)) {
NSArray* slicedArray = [data subarrayWithRange:NSMakeRange(0, lim)];
NSError *err;
completionHandler(slicedArray, err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment