Skip to content

Commit

Permalink
fix(ember-simple-auth): parse expirationTime before setting it
Browse files Browse the repository at this point in the history
  • Loading branch information
BobrImperator committed Dec 28, 2024
1 parent 1c5d435 commit 0f14b68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/ember-simple-auth/src/session-stores/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ export default class CookieStore extends BaseStore {

this._fastboot = (getOwner(this) as any).lookup('service:fastboot');

let cachedExpirationTime = this._read(`${this.get('cookieName')}-expiration_time`);
if (cachedExpirationTime) {
this.set('cookieExpirationTime', parseInt(cachedExpirationTime as any, 10));
const cachedExpirationTime = this._read(`${this.get('cookieName')}-expiration_time`);
const parsedExpirationTime = parseInt(cachedExpirationTime, 10);
if (parsedExpirationTime) {
this.set('cookieExpirationTime', parsedExpirationTime);
}

if (!this.get('_fastboot.isFastBoot')) {
Expand Down

0 comments on commit 0f14b68

Please sign in to comment.