Commit 6e90764f authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

database.js fixing flash messages

Fixed a bug where flash priority was never redefined from the original
message in which the priority could be undefined.
parent 3816d8e5
......@@ -320,10 +320,10 @@ Database.prototype = {
//the json result contain a flash message
if (res.message) {
priority = res.success == 'false' ? 2 : 1
priority = res.priority == 'undefined' ? priority : res.priority
priority = typeof res.priority == 'undefined' ? priority : res.priority
console.log({"type": "flash",
"msg": "database : " + res.message,
"priority": res.priority}) // res.success can be 'undefined'
"priority": priority}) // res.success can be 'undefined'
}
return res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment