Skip to content

Commit cd214ef

Browse files
Single slide bug fix
1 parent 62ba6e4 commit cd214ef

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

dist/jquery.glide.js

+5
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,11 @@
674674
*/
675675
Glide.prototype.slide = function(distance, jump, callback) {
676676

677+
// If there is one slide, escape
678+
if (this.slides.length <= 1) {
679+
return false;
680+
}
681+
677682
/**
678683
* Stop autoplay
679684
* Clearing timer

dist/jquery.glide.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.glide.js

+5
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,11 @@
666666
*/
667667
Glide.prototype.slide = function(distance, jump, callback) {
668668

669+
// If there is one slide, escape
670+
if (this.slides.length <= 1) {
671+
return false;
672+
}
673+
669674
/**
670675
* Stop autoplay
671676
* Clearing timer

0 commit comments

Comments
 (0)