From f0a7b2886ec1058741d45696787ce0302ea42fa6 Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 18 Jan 2023 16:43:18 +0000 Subject: [PATCH] replace .at() with array.length-1 --- src/Unread.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unread.ts b/src/Unread.ts index cbd30b2bb8e..6e7218cad12 100644 --- a/src/Unread.ts +++ b/src/Unread.ts @@ -85,7 +85,7 @@ export function doesRoomOrThreadHaveUnreadMessages(roomOrThread: Room | Thread): // https://github.com/vector-im/element-web/issues/2427 // ...and possibly some of the others at // https://github.com/vector-im/element-web/issues/3363 - if (roomOrThread.timeline.at(-1)?.getSender() === myUserId) { + if (roomOrThread.timeline[roomOrThread.timeline.length - 1]?.getSender() === myUserId) { return false; }