0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 20:12:40 +00:00

Add key to activate deletion for testing

This commit is contained in:
G.Ambatte
2025-10-04 14:54:57 +13:00
parent 18367526bd
commit e82921f81a

View File

@@ -10,11 +10,14 @@ const updateLocalStorage = function(){
const storage = window.localStorage;
const deleteKeys = storage?.getItem('HB_deleteKeys') != null;
console.log('DELETE KEYS:', deleteKeys);
Object.keys(localStorageKeyMap).forEach((key)=>{
if(storage[key] && !storage[localStorageKeyMap[key]]){
const data = storage.getItem(key);
storage.setItem(localStorageKeyMap[key], data);
// storage.removeItem(key);
if(deleteKeys) storage.removeItem(key);
}
});