diff --git a/static/js/check_new_messages.js b/static/js/check_new_messages.js index ddcbb61..b4c97f6 100644 --- a/static/js/check_new_messages.js +++ b/static/js/check_new_messages.js @@ -9,7 +9,10 @@ window.onload = function () { function funcFocus(){ - document.querySelector(".enter-message-inp").focus() + let inp = document.querySelector(".enter-message-inp") + if (inp !== null){ + inp.focus() + } } diff --git a/templates/blocks/profile/b_support_chat.html b/templates/blocks/profile/b_support_chat.html index 88cb3a6..1c84c09 100644 --- a/templates/blocks/profile/b_support_chat.html +++ b/templates/blocks/profile/b_support_chat.html @@ -48,7 +48,7 @@