Skip to content

Commit

Permalink
Update chat.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Giannini committed Jul 5, 2023
1 parent fe13da5 commit 608e78a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ socket.on("updateRooms", function (rooms, newRoom) {

function changeRoom(room) {
if (room != currentRoom) {
chatDisplay.innerHTML = "";
socket.emit("updateRooms", room);
document.getElementById(currentRoom).classList.remove("active_item");
currentRoom = room;
Expand Down

0 comments on commit 608e78a

Please sign in to comment.