Commit f5792f91 authored by Greg Wilson's avatar Greg Wilson Committed by GitHub

Merge pull request #5 from martin-probst/master

fix: crash on getDateOfBirth() if not entered into healthkit yet
parents e99c7f61 febdd6ac
......@@ -55,6 +55,14 @@
callback(@[RCTMakeError(@"error getting date of birth", error, nil)]);
return;
}
if(dob == nil) {
NSDictionary *response = @{
@"value" : [NSNull null],
@"age" : [NSNull null]
};
callback(@[[NSNull null], response]);
return;
}
NSString *dobString = [RCTAppleHealthKit buildISO8601StringFromDate:dob];
......
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