diff --git a/www/assets/js/functions.js b/www/assets/js/functions.js index 9fe9f9e2..e42a082b 100644 --- a/www/assets/js/functions.js +++ b/www/assets/js/functions.js @@ -131,15 +131,17 @@ function addUserDropdown(entry, name) { function formatChatMessage(data) { var div = $("
"); - if(data.msg.toUpperCase().indexOf(uname.toUpperCase()) != -1) { - div.addClass("nick-highlight"); - if(!FOCUSED) { - TITLE_BLINK = setInterval(function() { - if(document.title == "*Chat*") - document.title = PAGETITLE; - else - document.title = "*Chat*"; - }, 1000); + if(uname) { + if(data.msg.toUpperCase().indexOf(uname.toUpperCase()) != -1) { + div.addClass("nick-highlight"); + if(!FOCUSED) { + TITLE_BLINK = setInterval(function() { + if(document.title == "*Chat*") + document.title = PAGETITLE; + else + document.title = "*Chat*"; + }, 1000); + } } } if(data.msgclass == "action") {