0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Don't update storage values if key already exists

This commit is contained in:
G.Ambatte
2025-09-10 20:31:50 +12:00
parent 8d4ea7cfd8
commit 2663d86627

View File

@@ -23,7 +23,7 @@ const updateLocalStorage = function(){
Object.keys(storageKeyMap).forEach((key)=>{
if(storage[key]){
const data = storage.getItem(key);
storage.setItem(storageKeyMap[key], data);
if(!storage[storageKeyMap[key]]) storage.setItem(storageKeyMap[key], data);
// storage.removeItem(key);
}
});