From e3acc0a9e3885c32f06141956a162a9a6c8e4759 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sun, 29 Nov 2020 18:33:29 -0500 Subject: [PATCH] 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. --- framework/core/js/src/forum/states/PostStreamState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/src/forum/states/PostStreamState.js b/framework/core/js/src/forum/states/PostStreamState.js index d4d73b5fb..577a3f7b1 100644 --- a/framework/core/js/src/forum/states/PostStreamState.js +++ b/framework/core/js/src/forum/states/PostStreamState.js @@ -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(); }