Break after getting timestamp
This commit is contained in:
parent
8d12657483
commit
95a78538e0
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue