Skip to content

Commit

Permalink
Merge pull request #136 from mweimerskirch/patch-1
Browse files Browse the repository at this point in the history
If there are no results, there is no first result
  • Loading branch information
paulopmx committed Mar 12, 2014
2 parents 736304c + db4e28a commit 16cc6dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/flexigrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@
buildpager: function () { //rebuild pager based on new properties
$('.pcontrol input', this.pDiv).val(p.page);
$('.pcontrol span', this.pDiv).html(p.pages);
var r1 = (p.page - 1) * p.rp + 1;
var r1 = p.total == 0 ? 0 : (p.page - 1) * p.rp + 1;
var r2 = r1 + p.rp - 1;
if (p.total < r2) {
r2 = p.total;
Expand Down

0 comments on commit 16cc6dd

Please sign in to comment.