diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index 450aa4210..d0b15b62b 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -7,7 +7,7 @@ function post(url, callback, errortext) { xhr.onerror=function() { alert(errortext); }; xhr.onload = function() { if (xhr.status >= 200 && xhr.status < 300) { - callback(); + if (typeof callback === "function") callback(); } else { xhr.onerror(); } diff --git a/files/assets/js/gif_modal.js b/files/assets/js/gif_modal.js index df47bec16..e490d9537 100644 --- a/files/assets/js/gif_modal.js +++ b/files/assets/js/gif_modal.js @@ -76,4 +76,5 @@ function insertGIF(url,form) { commentBox.value = old + gif; + if (typeof checkForRequired === "function") checkForRequired(); } \ No newline at end of file diff --git a/files/templates/gif_modal.html b/files/templates/gif_modal.html index e4798272c..7c839f67a 100644 --- a/files/templates/gif_modal.html +++ b/files/templates/gif_modal.html @@ -1,4 +1,4 @@ - +