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
This commit is contained in:
J. Ryan Stinnett 2021-06-16 18:00:06 +01:00
parent 2eb7d35ea1
commit 7c6161d83a

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;