This commit is contained in:
Aevann1 2022-01-16 07:11:18 +02:00
parent 647ded0294
commit 9823b05536
7 changed files with 10 additions and 7 deletions

View file

@ -17,7 +17,8 @@ function post_toast2(url, button1, button2) {
xhr.withCredentials=true;
xhr.onload = function() {
try {let data = JSON.parse(xhr.response)}
let data
try {data = JSON.parse(xhr.response)}
catch(e) {}
if (xhr.status >= 200 && xhr.status < 300 && data && data["message"]) {
document.getElementById('toast-post-success-text').innerText = data["message"];