Skip to content

Commit d97c7a9

Browse files
committed
Add minor fix
1 parent 15b6e9f commit d97c7a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

BrowserImageSlideshow.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
return a;
3838
}
3939

40+
// [0, max)
4041
function randomizeTick(max) {
4142
tick = Math.floor(Math.random() * max);
4243
}
@@ -81,7 +82,7 @@
8182

8283
//randomize tick
8384
if (mode === 2) {
84-
randomizeTick(images.length-1);
85+
randomizeTick(images.length);
8586
}
8687

8788
let fadeDuration = slideDuration * 0.25;
@@ -106,7 +107,7 @@
106107
if (mode === 0) {
107108
shuffle(indexes);
108109
} else if (mode === 2) {
109-
randomizeTick(images.length-1);
110+
randomizeTick(images.length);
110111
}
111112
tick = 0;
112113
} else {

0 commit comments

Comments
 (0)