summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/async_client.jsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index 977fa8e7e..dc8013a6b 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -521,7 +521,9 @@ export function getPosts(id) {
return;
}
- if ($.isEmptyObject(PostStore.getAllPosts(channelId))) {
+ const postList = PostStore.getAllPosts(channelId);
+
+ if ($.isEmptyObject(postList) || postList.order.length < Constants.POST_CHUNK_SIZE) {
getPostsPage(channelId, Constants.POST_CHUNK_SIZE);
return;
}