Node.js based forum software built for the modern web
fix: if there is no hr create one
Barış Soner Uşaklıf249699d0b8b
diff --git a/public/src/client/chats.js b/public/src/client/chats.jsindex 9371914c1a..338ba78c55 100644--- a/public/src/client/chats.js+++ b/public/src/client/chats.js@@ -670,9 +670,11 @@ define('forum/chats', [function moveChatAndHrToTop(roomEl) {const hr = roomEl.next('hr');- components.get('chat/recent').prepend(roomEl);- if (hr.length) {- roomEl.after(hr);+ const recentChats = components.get('chat/recent');+ const chatCount = recentChats.find('[data-roomid]').length;+ recentChats.prepend(roomEl);+ if (hr.length || chatCount > 1) {+ roomEl.after(hr.length ? hr : `<hr class="my-1">`);}}