Merge pull request #40 from Sense545/master
Fixed bug where passing null to expiresDate failed
This commit is contained in:
commit
2b600fbb6c
|
@ -45,7 +45,8 @@ public class MyCookieManager implements MethodChannel.MethodCallHandler {
|
|||
String value = (String) call.argument("value");
|
||||
String domain = (String) call.argument("domain");
|
||||
String path = (String) call.argument("path");
|
||||
Long expiresDate = new Long((String) call.argument("expiresDate"));
|
||||
String expiresDateString = (String) call.argument("expiresDate");
|
||||
Long expiresDate = (expiresDateString != null ? new Long(expiresDateString) : null);
|
||||
Integer maxAge = (Integer) call.argument("maxAge");
|
||||
Boolean isSecure = (Boolean) call.argument("isSecure");
|
||||
MyCookieManager.setCookie(url, name, value, domain, path, expiresDate, maxAge, isSecure, result);
|
||||
|
|
|
@ -1393,7 +1393,7 @@ class CookieManager {
|
|||
args.putIfAbsent('value', () => value);
|
||||
args.putIfAbsent('domain', () => domain);
|
||||
args.putIfAbsent('path', () => path);
|
||||
args.putIfAbsent('expiresDate', () => expiresDate.toString());
|
||||
args.putIfAbsent('expiresDate', () => expiresDate?.toString());
|
||||
args.putIfAbsent('maxAge', () => maxAge);
|
||||
args.putIfAbsent('isSecure', () => isSecure);
|
||||
|
||||
|
|
Loading…
Reference in New Issue