Stop requesting null next replies from the server

A recent change (47e007e08f) introduced a
regression where we failed to check whether a reply thread has a next reply.
This meant that we would end up sending `/context/undefined` requests to the
server for every reply thread on every room view.

Fixes https://github.com/vector-im/element-web/issues/17563
Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/6079
pull/21833/head
J. Ryan Stinnett 2021-06-16 18:00:06 +01:00
parent ccf30ed94c
commit 8f02ca8ce9
1 changed files with 1 additions and 0 deletions

View File

@ -297,6 +297,7 @@ export default class ReplyThread extends React.Component {
} }
async getEvent(eventId) { async getEvent(eventId) {
if (!eventId) return null;
const event = this.room.findEventById(eventId); const event = this.room.findEventById(eventId);
if (event) return event; if (event) return event;