Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -640,9 +640,7 @@ |
641 | 641 | } |
642 | 642 | if ( pitches.length ) { |
643 | 643 | // Select randomly using equal distribution of available pitches |
644 | | - var randomIndex = Math.round( Math.random() * Number.MAX_VALUE ) |
645 | | - % pitches.length; |
646 | | - var key = pitches[randomIndex]; |
| 644 | + var key = pitches[Math.floor( Math.random() * list.length )]; |
647 | 645 | context.$ui.find( '.articleFeedback-pitches' ) |
648 | 646 | .css( 'width', context.$ui.width() ) |
649 | 647 | .find( '.articleFeedback-pitch[rel="' + key + '"]' ) |