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:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user