Commit 627169a0 authored by Mikaël Salson's avatar Mikaël Salson

main.js: Test config before accessing it

parent 787e5bd1
Pipeline #10941 passed with stages
in 14 seconds
......@@ -101,7 +101,7 @@ try {
this.db.log_error(err)
}
if (typeof config.alert !== 'undefined') {
if (typeof config !== 'undefined' && typeof config.alert !== 'undefined') {
$("#top-container").addClass("alert")
$("#alert").append(config.alert)
$("#alert").click(function () { console.log({'type': 'popup', 'default': config.alert}) })
......
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