Improve error reporting

This commit is contained in:
Jay Trees 2022-02-22 16:32:44 +01:00
parent 1b415e2472
commit 3686966f19

View file

@ -40,7 +40,9 @@ $(function() {
console.log(element); console.log(element);
console.log(xhr); console.log(xhr);
response = response.replace('<br />', ''); if ('string' === typeof response) {
response = response.replace('<br />', '');
}
$('body') $('body')
.modal({ .modal({
@ -61,7 +63,7 @@ $(function() {
console.log(element); console.log(element);
console.log(xhr); console.log(xhr);
if (response.startsWith('<br />')) { if ('string' === typeof response) {
response = response.replace('<br />', ''); response = response.replace('<br />', '');
} }