[fix] Database fix

This commit is contained in:
kwaroran
2023-07-16 04:32:55 +09:00
parent 0ca21feb57
commit c22b5af32f
2 changed files with 4 additions and 2 deletions

View File

@@ -281,7 +281,7 @@ export function setDatabase(data:Database){
data.openrouterRequestModel ??= 'openai/gpt-3.5-turbo'
data.toggleConfirmRecommendedPreset ??= true
changeLanguage(data.language)
setDatabase(data)
DataBase.set(data)
}

View File

@@ -322,7 +322,9 @@ export async function loadData() {
decodeRisuSave(backupData)
)
backupLoaded = true
} catch (error) {}
} catch (error) {
console.error(error)
}
}
if(!backupLoaded){
throw "Your save file is corrupted"