Permalink
Browse files

0.1.2 - Fix for empty arrays

  • Loading branch information...
1 parent 952df28 commit 8b4d8d6a2ef6f862200e3c79673e8f87e3f27f7d @tim-smart committed Jun 28, 2011
Showing with 6 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +4 −0 index.js
  3. +1 −1 package.json
View
@@ -0,0 +1 @@
+tags
View
@@ -270,6 +270,10 @@ Step.prototype.run = function (oper_state, array) {
var step = this
, state = new StepState(this, oper_state, array, [])
+ if (array.length === 0) {
+ return this.done(null, state)
+ }
+
if (this.serial) {
state.serialfn = function (error, data) {
step.next(state, state.count, error, data)
View
@@ -1,7 +1,7 @@
{ "name" : "async-array"
, "description" : "A sane control flow library"
, "keywords" : ["control", "flow", "async", "array"]
-, "version" : "0.1.1"
+, "version" : "0.1.2"
, "author" : "Tim Smart"
, "repository" :
{ "type" : "git"

0 comments on commit 8b4d8d6

Please sign in to comment.