Skip to content

Commit 6d67fd6

Browse files
committed
fix onControlsClick
1 parent e122195 commit 6d67fd6

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

dist/min/tiny-slider.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sourcemaps/tiny-slider.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tiny-slider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,6 @@ var tns = function(options) {
21222122
// on controls click
21232123
function onControlsClick (e, dir) {
21242124
if (!running) {
2125-
// var shouldRender;
21262125

21272126
if (!dir) {
21282127
e = e || win.event;
@@ -2144,6 +2143,7 @@ var tns = function(options) {
21442143
// Otherwise go to the next
21452144
if (rewind && index === indexMax){
21462145
goTo(0);
2146+
return;
21472147
} else {
21482148
index += slideBy;
21492149
}

src/tiny-slider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,6 @@ export var tns = function(options) {
17421742
// on controls click
17431743
function onControlsClick (e, dir) {
17441744
if (!running) {
1745-
// var shouldRender;
17461745

17471746
if (!dir) {
17481747
e = e || win.event;
@@ -1764,6 +1763,7 @@ export var tns = function(options) {
17641763
// Otherwise go to the next
17651764
if (rewind && index === indexMax){
17661765
goTo(0);
1766+
return;
17671767
} else {
17681768
index += slideBy;
17691769
}

src/tiny-slider.module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,6 @@ export var tns = function(options) {
17421742
// on controls click
17431743
function onControlsClick (e, dir) {
17441744
if (!running) {
1745-
// var shouldRender;
17461745

17471746
if (!dir) {
17481747
e = e || win.event;
@@ -1764,6 +1763,7 @@ export var tns = function(options) {
17641763
// Otherwise go to the next
17651764
if (rewind && index === indexMax){
17661765
goTo(0);
1766+
return;
17671767
} else {
17681768
index += slideBy;
17691769
}

0 commit comments

Comments
 (0)