diff --git a/examples/todomvc-flux/js/dispatcher/Dispatcher.js b/examples/todomvc-flux/js/dispatcher/Dispatcher.js index 7adf400245b..7aab2b13d9c 100644 --- a/examples/todomvc-flux/js/dispatcher/Dispatcher.js +++ b/examples/todomvc-flux/js/dispatcher/Dispatcher.js @@ -109,7 +109,7 @@ Dispatcher.prototype = merge(Dispatcher.prototype, { */ waitFor: function(/*array*/ promiseIndexes, /*function*/ callback) { var selectedPromises = _promises.filter(function(/*object*/ _, /*number*/ j) { - return promiseIndexes.indexOf(j) !== -1; + return promiseIndexes.indexOf(_) !== -1; }); Promise.all(selectedPromises).then(callback); }