aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat/chat.js
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-10-29 12:45:44 +0200
committerShpuld Shpuldson <shp@cock.li>2020-10-29 12:45:44 +0200
commit3ead79ddb42967e2e5e7ccc6d832543b066c7c9b (patch)
tree7af24d1819701527329b69b78af27127c21c85d4 /src/components/chat/chat.js
parent6acb61f2968063f19445a99851a2c1dda6783ac8 (diff)
document thie this. check
Diffstat (limited to 'src/components/chat/chat.js')
-rw-r--r--src/components/chat/chat.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js
index e60fe09d..c0c9ad6c 100644
--- a/src/components/chat/chat.js
+++ b/src/components/chat/chat.js
@@ -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)
}