Skip to content

Commit

Permalink
fix the error when on a completed task
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyZhao committed Sep 14, 2012
1 parent 6ef8354 commit a433927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wind-async.js
Expand Up @@ -665,7 +665,7 @@
return {
next: function (_this, callback) {

var onComplete = function (t) {
var onComplete = function () {
if (this.error) {
callback("throw", this.error);
} else {
Expand All @@ -687,7 +687,7 @@
} else if (task.status == "running") {
task.addEventListener("complete", onComplete);
} else {
onComplete(task);
onComplete.call(task);
}
}
};
Expand Down

0 comments on commit a433927

Please sign in to comment.