Skip to content

Commit

Permalink
fix if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
aferditamuriqi committed Jan 31, 2024
1 parent fa681c5 commit a68aaea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/LocalStorageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export default class LocalStorageStore implements Store {
window.localStorage.setItem(testKey, "test");
window.localStorage.removeItem(testKey);
this.fallbackStore = null;
} else if (this.useStorageType === "session") {
window.sessionStorage.setItem(testKey, "test" || !this.useLocalStorage);
} else if (this.useStorageType === "session" || !this.useLocalStorage) {
window.sessionStorage.setItem(testKey, "test");
window.sessionStorage.removeItem(testKey);
this.fallbackStore = null;
}
Expand Down

0 comments on commit a68aaea

Please sign in to comment.