Navigation Menu

Skip to content

Commit

Permalink
redundant code removed
Browse files Browse the repository at this point in the history
  • Loading branch information
dfilatov committed Apr 28, 2012
1 parent 4549e37 commit 35abc7b
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions lib/runner.js
Expand Up @@ -23,17 +23,15 @@ var Q = require('q'),
var block = t._blocks[id];
blocksPromises[id] = startDefer.promise
.then(function() {
return Q.allResolved(
[startDefer].concat(
block.deps?
block.deps.map(function(depId) {
return blocksPromises[depId];
}) :
[]
))
.then(function() {
return t._runBlock(block);
});
return block.deps?
Q.allResolved(
block.deps.map(function(depId) {
return blocksPromises[depId];
}))
.then(function() {
return t._runBlock(block);
}) :
t._runBlock(block);
})
.then(
function(blockRes) {
Expand Down

0 comments on commit 35abc7b

Please sign in to comment.