Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed repeated code in sequence

  • Loading branch information...
commit d17c92439653ba4e13209d9bf84af3201599bc1b 1 parent ce86762
@bnoguchi authored
Showing with 2 additions and 9 deletions.
  1. +2 −9 lib/sequence.js
View
11 lib/sequence.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.