From cbb8e637d6730169de1cdfc4fff56d04d3efae8a Mon Sep 17 00:00:00 2001 From: Roman Dvornov Date: Thu, 14 Nov 2024 22:44:11 +0100 Subject: [PATCH] Internal renaming to not clash with globals --- src/core/utils/persistent.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/utils/persistent.ts b/src/core/utils/persistent.ts index 38c58d0..c622549 100644 --- a/src/core/utils/persistent.ts +++ b/src/core/utils/persistent.ts @@ -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) {