diff --git a/src/cookie.mjs b/src/cookie.mjs index dc8e396..476b249 100644 --- a/src/cookie.mjs +++ b/src/cookie.mjs @@ -112,7 +112,7 @@ export default class Cookie { return this.name + "=" + this.value; } hasExpired(sessionEnded) { - return sessionEnded && this.expiry === null || this.expiry < new Date(); + return sessionEnded && this.expiry === null || this.expiry && this.expiry < new Date(); } isValidForRequest(requestURL) { if(this.hasExpired(false))