Better hasMore: Don't wait until length == 0

follow @Tirokk
This commit is contained in:
Robert Schäfer 2019-08-12 11:50:23 +02:00
parent 0b96b300d3
commit 9026157018

View File

@ -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
},