Fix alertError function to handle non-string messages
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user