Permalink
Browse files

Removed repeated code in sequence

  • Loading branch information...
bnoguchi committed Apr 5, 2011
1 parent ce86762 commit d17c92439653ba4e13209d9bf84af3201599bc1b
Showing with 2 additions and 9 deletions.
  1. +2 −9 lib/sequence.js
View
@@ -13,14 +13,6 @@ MaterializedSequence.prototype = {
, steps = this.steps
, firstStep = steps[0];
- var promises = this.steps.map( function (step) {
- var accepts = step.accepts
- , promises = step.promises
- // TODO step.block getter?
- , block = seq.module[step.name]();
- });
-
-
// This kicks off a sequence of steps based on a
// route
// Creates a new chain of promises and exposes the leading promise
@@ -44,7 +36,8 @@ MaterializedSequence.prototype = {
var accepts = step.accepts
, promises = step.promises
// TODO step.block getter?
- , block = this.module[step.name]();
+ , block = this.module[step.name]()
+ , seq = this;
// Unwrap values based on step.accepts
var args = accepts.reduce( function (args, accept) {

0 comments on commit d17c924

Please sign in to comment.