Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Feb 22, 2015
1 parent 0db9a02 commit 34ffc83
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions q.js
Original file line number Diff line number Diff line change
Expand Up @@ -1560,22 +1560,25 @@ function any(promises) {

pendingCount++;

when(promise, fulfilled, rejected, progress);
function fulfilled(result) {
when(promise, onFulfilled, onRejected, onProgress);
function onFulfilled(result) {
deferred.resolve(result);
};
function rejected(reason) {
}
function onRejected() {
pendingCount--;
if (pendingCount === 0) {
deferred.reject(new Error("Can't get fulfillment value from any promise, all promises were rejected."));
deferred.reject(new Error(
"Can't get fulfillment value from any promise, all " +
"promises were rejected."
));
}
};
function progress(progress) {
}
function onProgress(progress) {
deferred.notify({
index: index,
value: progress
});
};
}
}, undefined);

return deferred.promise;
Expand Down

0 comments on commit 34ffc83

Please sign in to comment.