document thie this. check

This commit is contained in:
Shpuld Shpuldson 2020-10-29 12:45:44 +02:00
parent 6acb61f296
commit 3ead79ddb4

View file

@ -240,6 +240,7 @@ const Chat = {
// arrive just as you're leaving the view and messages that you didn't actually
// get to see get marked as read.
window.setTimeout(() => {
// Don't mark as read if the element doesn't exist, user has left chat view
if (this.$el) this.readChat()
}, MARK_AS_READ_DELAY)
}