Do not display a message if there's no content

This commit is contained in:
Alex Tselegidis 2022-03-29 10:48:55 +02:00
parent 0564ded317
commit 09711853a6
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ window.App = (function () {
response = {message: jqXHR.responseText}; // String response response = {message: jqXHR.responseText}; // String response
} }
if (!response) { if (!response || !response.message) {
return; return;
} }
@ -37,7 +37,7 @@ window.App = (function () {
'html': [ 'html': [
$('<div/>', { $('<div/>', {
'class': 'card-body', 'class': 'card-body',
'html': response.message || '→ No error information provided.' 'html': response.message
}) })
] ]
}).appendTo('#message-box'); }).appendTo('#message-box');