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