0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 00:12:56 +00:00

Tweak local storage update logic

This commit is contained in:
G.Ambatte
2025-09-11 21:25:13 +12:00
parent a11fa72261
commit 1459f6a320

View File

@@ -11,9 +11,9 @@ const updateLocalStorage = function(){
const storage = window.localStorage;
Object.keys(localStorageKeyMap).forEach((key)=>{
if(storage[key]){
if(storage[key] && !storage[localStorageKeyMap[key]]){
const data = storage.getItem(key);
if(!storage[localStorageKeyMap[key]]) storage.setItem(localStorageKeyMap[key], data);
storage.setItem(localStorageKeyMap[key], data);
// storage.removeItem(key);
}
});