fix Cookie.hasExpired() for session cookies

This commit is contained in:
jkhsjdhjs 2019-08-17 05:15:16 +02:00
parent 0c767b3fee
commit afa7151e6a
Signed by: jkhsjdhjs
GPG Key ID: BAC6ADBAB7D576CC

View File

@ -112,7 +112,7 @@ export default class Cookie {
return this.name + "=" + this.value; return this.name + "=" + this.value;
} }
hasExpired(sessionEnded) { hasExpired(sessionEnded) {
return sessionEnded && this.expiry === null || this.expiry < new Date(); return sessionEnded && this.expiry === null || this.expiry && this.expiry < new Date();
} }
isValidForRequest(requestURL) { isValidForRequest(requestURL) {
if(this.hasExpired(false)) if(this.hasExpired(false))