修bug
This commit is contained in:
1 parent
1736432d72
commit
fb8b5d91ce
1 file changed
+4
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user