You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getPages: function (currentPage) {
var pages = [];
var half = Math.floor(this.options.visiblePages / 2);
var start = currentPage - half + 1 - this.options.visiblePages % 2;
var end = currentPage + half;
// handle boundary case
if (start <= 0) {
start = 1;
end = this.options.visiblePages;
}
if (end > this.options.totalPages) {
start = this.options.totalPages - this.options.visiblePages + 1;
end = this.options.totalPages;
}
var itPage = start;
while (itPage <= end) {
pages.push(itPage);
itPage++;
}
return {"currentPage": currentPage, "numeric": pages};
},
in below code block, if currentPage and half have different type(int and string), there will be error, same issue exists in "render" method: if ($this.data('page') === pages.currentPage) ==> if ($this.data('page') === +pages.currentPage)
The text was updated successfully, but these errors were encountered:
in below code block, if currentPage and half have different type(int and string), there will be error, same issue exists in "render" method:
if ($this.data('page') === pages.currentPage)
==>if ($this.data('page') === +pages.currentPage)
The text was updated successfully, but these errors were encountered: