Skip to content

Commit

Permalink
fix cookie store
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoow committed Jul 29, 2016
1 parent 620fc41 commit 2d49133
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addon/session-stores/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ export default BaseStore.extend({
domain: this.cookieDomain,
expires: isEmpty(expiration) ? null : new Date(expiration),
path: '/',
secure: this.get('_secureCookies'),
secure: this.get('_secureCookies')
};
this.get('cookies').write(this.cookieName, value, cookieOptions);
this.get('_cookies').write(this.cookieName, value, cookieOptions);
if (!isEmpty(expiration)) {
let expirationCookieName = `${this.cookieName}-expiration_time`;
let cachedExpirationTime = this.get('cookies').read(expirationCookieName);
this.get('cookies').write(expirationCookieName, this.cookieExpirationTime || cachedExpirationTime, cookieOptions);
let cachedExpirationTime = this.get('_cookies').read(expirationCookieName);
this.get('_cookies').write(expirationCookieName, this.cookieExpirationTime || cachedExpirationTime, cookieOptions);
}
},

Expand Down

0 comments on commit 2d49133

Please sign in to comment.