This commit is contained in:
shuaiplus committed 2025-05-05 01:05:42 +08:00
1 parent 1736432d72
commit fb8b5d91ce
1 file changed
+4
+4
View File
@@ -32,6 +32,10 @@ function switchRoom(index) {
function renderChatArea() {
const chatArea = document.getElementById('chat-area');
if (!chatArea) return;
if (activeRoomIndex < 0 || !roomsData[activeRoomIndex]) {
chatArea.innerHTML = '';
return;
}
chatArea.innerHTML = '';
roomsData[activeRoomIndex].messages.forEach(m => {
if (m.type === 'me') addMsg(m.text, true);