Skip to content

Commit

Permalink
feat: remove _initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
BobrImperator committed Apr 4, 2022
1 parent 293b0ba commit c3648eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default Base.extend({
const cookieStorage = owner.lookup('session-store:cookie');
const options = this.getProperties('sameSite', 'cookieDomain', 'cookieName', 'cookieExpirationTime', 'cookiePath');

cookieStorage._initialize(options);
cookieStorage.setProperties(options);
this.set('cookieExpirationTime', cookieStorage.get('cookieExpirationTime'));

store = cookieStorage;
Expand Down
11 changes: 0 additions & 11 deletions packages/ember-simple-auth/addon/session-stores/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { warn } from '@ember/debug';
import Ember from 'ember';
import BaseStore from './base';
import objectsAreEqual from '../utils/objects-are-equal';
import assign from 'ember-simple-auth/utils/assign';

const persistingProperty = function(beforeSet = function() {}) {
return computed({
Expand Down Expand Up @@ -178,16 +177,6 @@ export default BaseStore.extend({
if (owner && !this.hasOwnProperty('_fastboot')) {
this._fastboot = owner.lookup('service:fastboot');
}
},

_initialize(options) {
const clonedOptions = assign({}, options);
if (clonedOptions.cookieName) {
this.set('_cookieName', clonedOptions.cookieName);
}

delete clonedOptions.cookieName;
this.setProperties(clonedOptions);

let cachedExpirationTime = this._read(`${this.get('cookieName')}-expiration_time`);
if (cachedExpirationTime) {
Expand Down

0 comments on commit c3648eb

Please sign in to comment.