0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 04:22:44 +00:00

Permanently enable old local storage key deletion

This commit is contained in:
G.Ambatte
2025-10-05 12:25:51 +13:00
parent 44023f390c
commit ae51213c8c

View File

@@ -10,15 +10,13 @@ const updateLocalStorage = function(){
const storage = window.localStorage;
const deleteKeys = storage?.getItem('HB_deleteKeys') != null;
Object.keys(localStorageKeyMap).forEach((key)=>{
if(storage[key]){
if(!storage[localStorageKeyMap[key]]){
const data = storage.getItem(key);
storage.setItem(localStorageKeyMap[key], data);
};
if(deleteKeys) storage.removeItem(key);
storage.removeItem(key);
}
});