From 3ead79ddb42967e2e5e7ccc6d832543b066c7c9b Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Thu, 29 Oct 2020 12:45:44 +0200 Subject: [PATCH] document thie this. check --- src/components/chat/chat.js | 1 + 1 file changed, 1 insertion(+) 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) }