Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 66e6edd

Browse files
authored
Merge pull request #9935 from andybalaam/backport-9933-to-staging
replace .at() with array.length-1
2 parents 57a003f + b49f83f commit 66e6edd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Unread.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function doesRoomOrThreadHaveUnreadMessages(roomOrThread: Room | Thread):
8585
// https://github.com/vector-im/element-web/issues/2427
8686
// ...and possibly some of the others at
8787
// https://github.com/vector-im/element-web/issues/3363
88-
if (roomOrThread.timeline.at(-1)?.getSender() === myUserId) {
88+
if (roomOrThread.timeline[roomOrThread.timeline.length - 1]?.getSender() === myUserId) {
8989
return false;
9090
}
9191

0 commit comments

Comments
 (0)