fix(frontend): restore chat DOM structure and guard addMessage against null
This commit is contained in:
1 parent
70a5159f81
commit
76397d52d7
3 files changed
+16
-6
No files matched your search
@@ -119,7 +119,8 @@ function connectWebSocket(room: string) {
|
||||
}
|
||||
|
||||
function addMessage(type: string, text: string, sender = "", timestamp = new Date()) {
|
||||
const messages = document.getElementById("messages")!;
|
||||
const messages = document.getElementById("messages");
|
||||
if (!messages) return;
|
||||
const div = document.createElement("div");
|
||||
div.className = "message-row";
|
||||
|
||||
|
||||
Reference in new issue
Block a user