Skip to content

Commit

Permalink
fix random item js
Browse files Browse the repository at this point in the history
  • Loading branch information
jdshaw committed Oct 20, 2022
1 parent d356f8b commit 58d6d37
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions asset/js/random-items-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ class RandomItemsBlock {
const self = this
el.html(this.spinner);
setTimeout(function(){
for (let i = 1; i <= self.totalImages; i++) {
self.randIdx = (self.randIdx + i) % self.itemIds.length;
self.randIdx = Math.floor(Math.random() * self.itemIds.length);
self.getRandomItem(el, btn)
}
}, 400, el, btn);

}
Expand Down

0 comments on commit 58d6d37

Please sign in to comment.