Skip to content

Commit

Permalink
Fixing an issue with auto slide not working properly if it was
Browse files Browse the repository at this point in the history
initially initialized to zero
  • Loading branch information
NickPiscitelli committed May 7, 2020
1 parent e0743bc commit 133c568
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/assets/js/glider.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions glider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\___//_//_/ \_,_/ \__//_/ (_)__/ //___/
|___/
Version: 1.7.2
Version: 1.7.3
Author: Nick Piscitelli (pickykneee)
Website: https://nickpiscitelli.com
Documentation: http://nickpiscitelli.github.io/Glider.js
Expand Down Expand Up @@ -109,7 +109,10 @@
var breakpointChanged = _.settingsBreakpoint()
if (!paging) paging = breakpointChanged

if (_.opt.slidesToShow === 'auto' || _.opt._autoSlide) {
if (
_.opt.slidesToShow === 'auto' ||
typeof _.opt._autoSlide !== 'undefined'
) {
var slideCount = _.containerWidth / _.opt.itemWidth

_.opt._autoSlide = _.opt.slidesToShow = _.opt.exactWidth
Expand Down
Loading

0 comments on commit 133c568

Please sign in to comment.