Update Dispatcher.js
volkanunsal committed
May 5, 2014 at 12:20 UTC
035a648a2d3bc117d81a88c07641eb48f15fafb3
1 file changed
+3
-1
examples/todomvc-flux/js/dispatcher/Dispatcher.js
+3
-1
@@ -108,7 +108,9 @@ Dispatcher.prototype = merge(Dispatcher.prototype, {
108
* A more robust Dispatcher would issue a warning in this scenario.
109
*/
110
waitFor: function(/*array*/ promiseIndexes, /*function*/ callback) {
111
- var selectedPromises = _promises.filter(function(_,j){return promiseIndexes.indexOf(j) !== -1;})
111
+ var selectedPromises = _promises.filter(function(/*object*/ _, /*number*/ j) {
112
+ return promiseIndexes.indexOf(j) !== -1;
113
+ });
114
Promise.all(selectedPromises).then(callback);
115
}
116