diff --git a/src/assets/js/default.js b/src/assets/js/default.js index 603c0fa9..6ea17a0a 100644 --- a/src/assets/js/default.js +++ b/src/assets/js/default.js @@ -40,7 +40,9 @@ $(function() { console.log(element); console.log(xhr); - response = response.replace('
', ''); + if ('string' === typeof response) { + response = response.replace('
', ''); + } $('body') .modal({ @@ -61,7 +63,7 @@ $(function() { console.log(element); console.log(xhr); - if (response.startsWith('
')) { + if ('string' === typeof response) { response = response.replace('
', ''); }