mirror of https://github.com/calzoneman/sync.git
Fix rare case where paginator breaks
This commit is contained in:
parent
8f72854e38
commit
229f8a206a
|
@ -26,8 +26,8 @@
|
||||||
return;
|
return;
|
||||||
var ul = $("<ul/>").appendTo(this.paginator);
|
var ul = $("<ul/>").appendTo(this.paginator);
|
||||||
var s = p - parseInt(this.opts.maxPages / 2);
|
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 + this.opts.maxPages < pages ? s : pages - this.opts.maxPages;
|
||||||
|
s = s < 0 ? 0 : s;
|
||||||
if(endcaps) {
|
if(endcaps) {
|
||||||
var li = $("<li/>").appendTo(ul);
|
var li = $("<li/>").appendTo(ul);
|
||||||
$("<a/>").attr("href", "javascript:void(0)")
|
$("<a/>").attr("href", "javascript:void(0)")
|
||||||
|
|
Loading…
Reference in New Issue