0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-23 00:08:11 +00:00

Revert "renamed client to src"

This reverts commit c28736bd01.
This commit is contained in:
Víctor Losada Hernández
2026-02-01 17:36:53 +01:00
parent c28736bd01
commit 3e76046868
140 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import getLocalStorageMap from './localStorageKeyMap.js';
const updateLocalStorage = function(){
// Return if no window and thus no local storage
if(typeof window === 'undefined') return;
const localStorageKeyMap = getLocalStorageMap();
const storage = window.localStorage;
Object.keys(localStorageKeyMap).forEach((key)=>{
if(storage[key]){
if(!storage[localStorageKeyMap[key]]){
const data = storage.getItem(key);
storage.setItem(localStorageKeyMap[key], data);
};
storage.removeItem(key);
}
});
};
export { updateLocalStorage };