Skip to content

Commit

Permalink
Defer to approach in 11ty#2208
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed May 11, 2022
1 parent 34f0146 commit 045ca99
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Plugins/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,9 @@ class Pagination {
// so that we don’t have the memory cost of the full template (and can reuse the parent
// template for some things)

let pageNumberStop = items.length;
if(pageNumberStop === 0 && this.data.pagination.pageOnEmptyData) {
pageNumberStop = 1;
}

for (
let pageNumber = 0;
pageNumber < pageNumberStop;
pageNumber < items.length;
pageNumber++
) {
let cloned = this.template.clone();
Expand Down

0 comments on commit 045ca99

Please sign in to comment.