Parcourir la source

Merge pull request #117 from marcelweder/patch-1

Fixed _random to match last item also.
Jay Salvat il y a 9 ans
Parent
commit
5c73363428
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/vegas.js

+ 1 - 1
src/vegas.js

@@ -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 () {