add error exception to postToastSwitch
parent
2eaa72b4e8
commit
760c4f7ae0
|
@ -98,8 +98,11 @@ function postToastSwitch(t, url, button1, button2, cls, extraActionsOnSuccess, m
|
|||
if (typeof(button1) == 'boolean') {
|
||||
location.reload()
|
||||
} else {
|
||||
document.getElementById(button1).classList.toggle(cls);
|
||||
document.getElementById(button2).classList.toggle(cls);
|
||||
try {
|
||||
document.getElementById(button1).classList.toggle(cls);
|
||||
document.getElementById(button2).classList.toggle(cls);
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
}
|
||||
if (extraActionsOnSuccess) extraActionsOnSuccess(xhr);
|
||||
|
|
Loading…
Reference in New Issue