diff --git a/static/js/check_new_messages.js b/static/js/check_new_messages.js index 3896fe0..f457de2 100644 --- a/static/js/check_new_messages.js +++ b/static/js/check_new_messages.js @@ -39,7 +39,6 @@ function check_window_tm(){ clearInterval(intervl) checkOpenWindow(window) } - console.log("1") }, 1000) } @@ -88,8 +87,8 @@ function check_new_messages (window,data){ }, error: function (data){ - document.querySelector(".info_profile").innerHTML = data.responseJSON.html; - if (window === null){ + let request = document.querySelector(".info_profile").innerHTML = data.responseJSON.html; + if (request === undefined || window === null){ clearTimeout(check_msg) checkOpenWindow() }