From 902615701803ce07783f326a0f886aa751e6841d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 12 Aug 2019 11:50:23 +0200 Subject: [PATCH] Better `hasMore`: Don't wait until length == 0 follow @Tirokk --- webapp/pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index 9c9e61070..683e5eb65 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -157,7 +157,7 @@ export default { // TODO: find out why `update` gets called twice initially. // We have to filter for uniq posts only because we get the same // result set twice. - this.hasMore = !!Post.length + this.hasMore = Post.length >= this.pageSize const posts = uniqBy([...this.posts, ...Post], 'id') this.posts = posts },