diff --git a/src/components/Spelllist.vue b/src/components/Spelllist.vue index 7a9ffca..b010196 100644 --- a/src/components/Spelllist.vue +++ b/src/components/Spelllist.vue @@ -64,6 +64,7 @@ export default { pagedSpells () { return new Query(this.sortedSpells) .paginate(this.page, this.perPage) + .results }, sortedSpells () { return this.spells diff --git a/src/query.js b/src/query.js index 7975a01..02daf2e 100644 --- a/src/query.js +++ b/src/query.js @@ -34,6 +34,7 @@ export default class Query { paginate (page = 1, perPage = 10) { let min = page * perPage - perPage let max = min + perPage - return this.data.slice(min, max) + this.data = this.data.slice(min, max) + return this } }