diff options
-rw-r--r-- | web/react/utils/async_client.jsx | 4 |
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; } |