Skip to content

Commit

Permalink
fix(iOS): Resolve crash for cookies with null expiry date. (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjsmith authored and safaiyeh committed Jan 28, 2020
1 parent 46044a0 commit 97c48ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/RNCookieManagerIOS/RNCookieManagerIOS.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ -(NSString *)getDomainName:(NSURL *) url
[d setObject:c.name forKey:@"name"];
[d setObject:c.domain forKey:@"domain"];
[d setObject:c.path forKey:@"path"];
[d setObject:[self.formatter stringFromDate:c.expiresDate] forKey:@"expiresDate"];
if (c.expiresDate != NULL) {
[d setObject:[self.formatter stringFromDate:c.expiresDate] forKey:@"expiresDate"];
}
[cookies setObject:d forKey:c.name];
}
resolve(cookies);
Expand Down

0 comments on commit 97c48ba

Please sign in to comment.