Skip to content

Commit f29394c

Browse files
committed
(fix) add sanity check
1 parent 7fb4888 commit f29394c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ChatWindow/Room/Room.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ export default {
570570
571571
if (index !== this.messages.length - 1) return
572572
573-
const messageHeight = document.getElementById(message._id).offsetHeight
573+
const messageHeight = document.getElementById(message._id)?.offsetHeight
574574
const autoScrollOffset = messageHeight + 60
575575
576576
setTimeout(() => {

0 commit comments

Comments
 (0)