Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2365] Remove _initialize method #2366

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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