Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Mar 18, 2015
1 parent 4b244b3 commit a773d02
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/javascripts/ng-admin/Crud/misc/PromisesResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ define(function () {
function resolve(result) {
states[key] = true;
results[key] = result; // result may be an error
var allFinished = true;
states.forEach(function (state) {
if (!state) {
allFinished = false;
for (var i in states) {
if (!states[i]) {
return;
}
});
if (allFinished) {
deferred.resolve(results);
}
deferred.resolve(results);
}
function resolveSuccess(result) {
return resolve({ status: 'success', result: result });
Expand Down

0 comments on commit a773d02

Please sign in to comment.