Skip to content

Commit

Permalink
code refactored and removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
MoumitaM committed Apr 22, 2022
1 parent c35f609 commit f026395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions utils/storage/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class CookieLocal {
constructor(options) {
this._options = {};
this.options(options);
this.cookieSupported = this.IsCookieSupported();
}

/**
Expand All @@ -31,11 +32,6 @@ class CookieLocal {
domain,
samesite: "Lax",
});

// try setting a cookie first
if (this.IsCookieSupported()) {
this._options.domain = null;
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion utils/storage/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Storage {
constructor() {
// First try setting the storage to cookie else to localstorage

if (Cookie.IsCookieSupported()) {
if (Cookie.cookieSupported) {
this.storage = Cookie;
return;
}
Expand Down

0 comments on commit f026395

Please sign in to comment.