1
0
mirror of https://github.com/flarum/core.git synced 2025-08-09 18:07:02 +02:00

Fix goToIndex to visible end

In the PostStream, `this.visibleEnd` represents the index of the last post + 1, but `loadNearIndex` treated it as if it was the index of the last post. This means that executing `goToIndex` on the post stream's current `this.visiblePost` didn't load new posts, and as a result, the requested scrolling did not occur.
This commit is contained in:
Alexander Skvortsov
2020-11-29 18:33:29 -05:00
parent ddb3d3edb0
commit 09e2736cbc

View File

@@ -172,7 +172,7 @@ class PostStreamState {
* @return {Promise}
*/
loadNearIndex(index) {
if (index >= this.visibleStart && index <= this.visibleEnd) {
if (index >= this.visibleStart && index < this.visibleEnd) {
return Promise.resolve();
}