Skip to content
This repository
Browse code

Removed repeated code in sequence

  • Loading branch information...
commit d17c92439653ba4e13209d9bf84af3201599bc1b 1 parent ce86762
Brian Noguchi authored

Showing 1 changed file with 2 additions and 9 deletions. Show diff stats Hide diff stats

  1. +2 9 lib/sequence.js
11 lib/sequence.js
@@ -13,14 +13,6 @@ MaterializedSequence.prototype = {
13 13 , steps = this.steps
14 14 , firstStep = steps[0];
15 15
16   - var promises = this.steps.map( function (step) {
17   - var accepts = step.accepts
18   - , promises = step.promises
19   - // TODO step.block getter?
20   - , block = seq.module[step.name]();
21   - });
22   -
23   -
24 16 // This kicks off a sequence of steps based on a
25 17 // route
26 18 // Creates a new chain of promises and exposes the leading promise
@@ -44,7 +36,8 @@ MaterializedSequence.prototype = {
44 36 var accepts = step.accepts
45 37 , promises = step.promises
46 38 // TODO step.block getter?
47   - , block = this.module[step.name]();
  39 + , block = this.module[step.name]()
  40 + , seq = this;
48 41
49 42 // Unwrap values based on step.accepts
50 43 var args = accepts.reduce( function (args, accept) {

0 comments on commit d17c924

Please sign in to comment.
Something went wrong with that request. Please try again.