Handle convert error
parent
d21df64719
commit
6c554022ad
|
@ -122,7 +122,11 @@
|
|||
const converted = convertTime(JSON.parse(remoteSave[key]));
|
||||
await updateSave(key, converted, true);
|
||||
} else {
|
||||
try {
|
||||
await updateSave(key, JSON.parse(remoteSave[key]), true);
|
||||
} catch (err) {
|
||||
await updateSave(key, remoteSave[key], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log('finished convert from google drive');
|
||||
|
@ -151,7 +155,11 @@
|
|||
const converted = convertTime(JSON.parse(remoteSave[key]));
|
||||
await updateSave(key, converted, true);
|
||||
} else {
|
||||
try {
|
||||
await updateSave(key, JSON.parse(remoteSave[key]), true);
|
||||
} catch (err) {
|
||||
await updateSave(key, remoteSave[key], true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
await updateSave(key, remoteSave[key], true);
|
||||
|
|
|
@ -93,7 +93,11 @@ const convertSave = async () => {
|
|||
const converted = convertTime(JSON.parse(value));
|
||||
await localforage.setItem(key, converted);
|
||||
} else {
|
||||
try {
|
||||
await localforage.setItem(key, JSON.parse(value));
|
||||
} catch (err) {
|
||||
await localforage.setItem(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
if (!key.endsWith('locale')) {
|
||||
|
|
Loading…
Reference in New Issue