Fix alertError function to handle non-string messages

This commit is contained in:
kwaroran
2024-04-22 01:35:58 +09:00
parent 27d045292a
commit 67c8e39d83

View File

@@ -26,6 +26,14 @@ export function alertError(msg:string){
console.error(msg)
const db = get(DataBase)
if(typeof(msg) !== 'string'){
try{
msg = JSON.stringify(msg)
}catch(e){
msg = `${msg}`
}
}
let submsg = ''
//check if it's a known error