diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js
index 45915e89e..ba6f918df 100644
--- a/files/assets/js/chat.js
+++ b/files/assets/js/chat.js
@@ -80,7 +80,8 @@ socket.on('speak', function(json) {
document.getElementsByClassName('userlink')[0].classList.remove('d-none')
document.getElementsByClassName('avatar')[0].classList.remove('d-none')
document.getElementsByClassName('avatar-pic')[0].src = json['avatar']
- if (json['hat']) document.getElementsByClassName('avatar-hat')[0].src = json['hat']} + "?v=3"
+ if (json['hat'])
+ document.getElementsByClassName('avatar-hat')[0].src = json['hat'] + "?v=3"
document.getElementsByClassName('userlink')[0].href = '/@' + json['username']
document.getElementsByClassName('userlink')[0].style.color = '#' + json['namecolor']
document.getElementsByClassName('time')[0].classList.remove('d-none')
diff --git a/files/templates/chat.html b/files/templates/chat.html
index ba095d38a..bd81357c9 100644
--- a/files/templates/chat.html
+++ b/files/templates/chat.html
@@ -222,6 +222,6 @@
-
+