[fix] Database fix
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user