Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hide if only one page check added (issue josecebe#126 fixed)
  • Loading branch information
Eugene Simakin committed Sep 25, 2016
1 parent 474df69 commit 63cc9ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jquery.twbsPagination.js
Expand Up @@ -32,6 +32,11 @@
throw new Error('Visible pages option is not correct!');
}

// hide if only one page exists
if (this.options.totalPages == 1) {
return this;
}

if (this.options.totalPages < this.options.visiblePages) {
this.options.visiblePages = this.options.totalPages;
}
Expand Down

0 comments on commit 63cc9ca

Please sign in to comment.