Skip to content

Commit

Permalink
[minor] Reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Jan 15, 2015
1 parent efe7d82 commit 92fb415
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,17 @@ Supply.prototype.each = function each() {
function next(err, done) {
var layer = supply.layers[i++];

if (err || done || !layer) return fn(err, !!done);

if (layer.length > length) return layer.fn.apply(supply.provider, args.concat(next));
else dollars.catch(function catching() {
return layer.fn.apply(supply.provider, args);
}, next);
if (err || done || !layer) {
return fn(err, !!done);
}

if (layer.length > length) {
return layer.fn.apply(supply.provider, args.concat(next));
} else {
dollars.catch(function catching() {
return layer.fn.apply(supply.provider, args);
}, next);
}
}

length = args.length;
Expand Down

0 comments on commit 92fb415

Please sign in to comment.