From c3648ebda7fadd70663482ca661a761fdf7266d9 Mon Sep 17 00:00:00 2001 From: Bartlomiej Dudzik Date: Mon, 4 Apr 2022 15:52:27 +0200 Subject: [PATCH] feat: remove _initialize --- .../addon/session-stores/adaptive.js | 2 +- .../ember-simple-auth/addon/session-stores/cookie.js | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/ember-simple-auth/addon/session-stores/adaptive.js b/packages/ember-simple-auth/addon/session-stores/adaptive.js index 6883682d2..3fe61b43a 100644 --- a/packages/ember-simple-auth/addon/session-stores/adaptive.js +++ b/packages/ember-simple-auth/addon/session-stores/adaptive.js @@ -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; diff --git a/packages/ember-simple-auth/addon/session-stores/cookie.js b/packages/ember-simple-auth/addon/session-stores/cookie.js index bb04dff8c..315b1faeb 100644 --- a/packages/ember-simple-auth/addon/session-stores/cookie.js +++ b/packages/ember-simple-auth/addon/session-stores/cookie.js @@ -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({ @@ -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) {