mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
fix test dont turn single pages into ...
This commit is contained in:
@@ -46,7 +46,9 @@ pagination.create = function (currentPage, pageCount, queryObj) {
|
||||
});
|
||||
|
||||
for (i = pages.length - 1; i > 0; --i) {
|
||||
if (pages[i - 1].page !== pages[i].page - 1) {
|
||||
if (pages[i].page - 2 === pages[i - 1].page) {
|
||||
pages.splice(i, 0, {page: pages[i].page - 1, active: false, qs: qs.stringify(queryObj)});
|
||||
} else if (pages[i].page - 1 !== pages[i - 1].page) {
|
||||
pages.splice(i, 0, {separator: true});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user