Break after getting timestamp

This commit is contained in:
Travis Ralston 2020-01-29 11:23:48 +00:00 committed by GitHub
parent 8d12657483
commit 95a78538e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -360,6 +360,7 @@ export default class InviteDialog extends React.PureComponent {
const ev = room.timeline[i];
if (searchTypes.includes(ev.getType())) {
lastEventTs = ev.getTs();
break;
}
if (room.timeline.length - i > maxSearchEvents) break;
}