Skip to content

Commit

Permalink
Merge tag 'v23.1.1' into sc
Browse files Browse the repository at this point in the history
* Fix backwards compability for environment not support Array.prototype.at ([\matrix-org#3080](matrix-org#3080)).
  • Loading branch information
su-ex committed Jan 30, 2023
2 parents e6c127a + 8408f36 commit d89e210
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Changes in [23.1.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v23.1.1) (2023-01-20)
==================================================================================================

## 🐛 Bug Fixes
* Fix backwards compability for environment not support Array.prototype.at ([\#3080](https://github.com/matrix-org/matrix-js-sdk/pull/3080)).

Changes in [23.1.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v23.1.0) (2023-01-18)
==================================================================================================

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matrix-js-sdk",
"version": "23.1.0",
"version": "23.1.1",
"description": "Matrix Client-Server SDK for Javascript",
"engines": {
"node": ">=16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/models/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ export class Thread extends ReadReceipt<EmittedEvents, EventHandlerMap> {
*/
public getEventReadUpTo(userId: string, ignoreSynthesized?: boolean): string | null {
const isCurrentUser = userId === this.client.getUserId();
const lastReply = this.timeline.at(-1);
const lastReply = this.timeline[this.timeline.length - 1];
if (isCurrentUser && lastReply) {
// If the last activity in a thread is prior to the first threaded read receipt
// sent in the room (suggesting that it was sent before the user started
Expand Down

0 comments on commit d89e210

Please sign in to comment.