Skip to content

Commit

Permalink
Fixed _random to match last item also.
Browse files Browse the repository at this point in the history
The function is not correct. It will never return the last item of array.
  • Loading branch information
marcelweder committed May 4, 2016
1 parent 9e0a59f commit 9f2c48b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vegas.js
Expand Up @@ -203,7 +203,7 @@
},

_random: function (array) {
return array[Math.floor(Math.random() * (array.length - 1))];
return array[Math.floor(Math.random() * array.length)];
},

_slideShow: function () {
Expand Down

0 comments on commit 9f2c48b

Please sign in to comment.