Skip to content

Commit

Permalink
Merge pull request kenwheeler#2152 from mazzaker/kenwheeler#2146
Browse files Browse the repository at this point in the history
Small fix for non-infinite carousels having the wrong amount of pages.
  • Loading branch information
simeydotme committed Apr 21, 2016
2 parents 7a79c43 + 35caa07 commit 85cae05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,9 @@
}
} else if (_.options.centerMode === true) {
pagerQty = _.slideCount;
} else {
} else if(!_.options.asNavFor) {
pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
}else {
while (breakPoint < _.slideCount) {
++pagerQty;
breakPoint = counter + _.options.slidesToScroll;
Expand Down

0 comments on commit 85cae05

Please sign in to comment.