mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 19:32:42 +00:00
Don't update storage values if key already exists
This commit is contained in:
@@ -23,7 +23,7 @@ const updateLocalStorage = function(){
|
|||||||
Object.keys(storageKeyMap).forEach((key)=>{
|
Object.keys(storageKeyMap).forEach((key)=>{
|
||||||
if(storage[key]){
|
if(storage[key]){
|
||||||
const data = storage.getItem(key);
|
const data = storage.getItem(key);
|
||||||
storage.setItem(storageKeyMap[key], data);
|
if(!storage[storageKeyMap[key]]) storage.setItem(storageKeyMap[key], data);
|
||||||
// storage.removeItem(key);
|
// storage.removeItem(key);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user