Skip to content

Commit

Permalink
Internal renaming to not clash with globals
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Nov 14, 2024
1 parent 7098126 commit cbb8e63
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/utils/persistent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ function getStorageMap(type: StorageType): StorageMap {
return map;
}

const sessionStorage = getStorageMap('sessionStorage');
const localStorage = getStorageMap('localStorage');
const sessionStorageMap = getStorageMap('sessionStorage');
const localStorageMap = getStorageMap('localStorage');
const storages = new Map([
['session', sessionStorage],
['local', localStorage]
['session', sessionStorageMap],
['local', localStorageMap]
]);

export const sessionStorageEntry = sessionStorage.getOrCreate;
export const localStorageEntry = localStorage.getOrCreate;
export const sessionStorageEntry = sessionStorageMap.getOrCreate;
export const localStorageEntry = localStorageMap.getOrCreate;

addEventListener('storage', (e) => {
for (const [, map] of storages) {
Expand Down

0 comments on commit cbb8e63

Please sign in to comment.