fix for loop - check happens before pre-inc so cause issues at end of TL

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2017-07-22 13:15:32 +01:00
parent c9b547368b
commit 8e66e64621
No known key found for this signature in database
GPG Key ID: 0435A1D4BBD34D64
1 changed files with 1 additions and 1 deletions

View File

@ -1023,7 +1023,7 @@ var TimelinePanel = React.createClass({
let latestReadEventIndex = i;
// Place the RM at a hidden event below the latest seen event (if exists)
// to prevent RM going up the timeline between clients which do not hide the same events.
for (let j = i; j < this.state.events.length; ++j) {
for (let j = i + 1; j < this.state.events.length; j++) {
if (messagePanel._shouldShowEvent(this.state.events[j])) break;
latestReadEventIndex = j;
}