Skip to content

Commit

Permalink
Revert "fix old maxAge bug"
Browse files Browse the repository at this point in the history
This reverts commit 8c2aa89.
  • Loading branch information
lushijie committed Apr 18, 2019
1 parent 8c2aa89 commit b9da3ab
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.js
Expand Up @@ -46,11 +46,8 @@ class CookieSession {
try {
const result = JSON.parse(data);
this.data = result.data || {};
this.maxAge = result.maxAge || 0;
this.expire = result.expire || 0;
const offsetTime = this.maxAge - result.maxAge;
if (offsetTime !== 0) {
this.expire = +new Date(this.expire) - offsetTime;
}
this.fresh = false;
} catch (e) {}
}
Expand Down

0 comments on commit b9da3ab

Please sign in to comment.