[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.openrouterRequestModel ??= 'openai/gpt-3.5-turbo'
|
||||||
data.toggleConfirmRecommendedPreset ??= true
|
data.toggleConfirmRecommendedPreset ??= true
|
||||||
changeLanguage(data.language)
|
changeLanguage(data.language)
|
||||||
setDatabase(data)
|
DataBase.set(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -322,7 +322,9 @@ export async function loadData() {
|
|||||||
decodeRisuSave(backupData)
|
decodeRisuSave(backupData)
|
||||||
)
|
)
|
||||||
backupLoaded = true
|
backupLoaded = true
|
||||||
} catch (error) {}
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!backupLoaded){
|
if(!backupLoaded){
|
||||||
throw "Your save file is corrupted"
|
throw "Your save file is corrupted"
|
||||||
|
|||||||
Reference in New Issue
Block a user