Fix rare case where paginator breaks

This commit is contained in:
calzoneman 2013-08-01 15:20:50 -04:00
parent 8f72854e38
commit 229f8a206a
1 changed files with 1 additions and 1 deletions

View File

@ -26,8 +26,8 @@
return;
var ul = $("<ul/>").appendTo(this.paginator);
var s = p - parseInt(this.opts.maxPages / 2);
s = s < 0 ? 0 : s;
s = s + this.opts.maxPages < pages ? s : pages - this.opts.maxPages;
s = s < 0 ? 0 : s;
if(endcaps) {
var li = $("<li/>").appendTo(ul);
$("<a/>").attr("href", "javascript:void(0)")