mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
ESlint no-plusplus
and no-empty, space-unary-ops
This commit is contained in:
@@ -26,7 +26,7 @@ pagination.create = function (currentPage, pageCount, queryObj) {
|
||||
if (startPage > pageCount - 5) {
|
||||
startPage -= 2 - (pageCount - currentPage);
|
||||
}
|
||||
for(var i = 0; i < 5; ++i) {
|
||||
for(var i = 0; i < 5; i += 1) {
|
||||
pagesToShow.push(startPage + i);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ pagination.create = function (currentPage, pageCount, queryObj) {
|
||||
return {page: page, active: page === currentPage, qs: qs.stringify(queryObj)};
|
||||
});
|
||||
|
||||
for (i = pages.length - 1; i > 0; --i) {
|
||||
for (i = pages.length - 1; i > 0; i -= 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) {
|
||||
|
||||
Reference in New Issue
Block a user