1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

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

View File

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