setting the this-context of the callback functions to 'self' to allow coffeescri…
…pt @-shorthand syntax
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -200,7 +200,7 @@ | ... | @@ -200,7 +200,7 @@ |
200 | clearInterval(self.checker); | 200 | clearInterval(self.checker); |
201 | if (isType(onComplete, "function")) { | 201 | if (isType(onComplete, "function")) { |
202 | try { | 202 | try { |
203 | onComplete(self); | 203 | onComplete.call(self, self); |
204 | } catch (err) { | 204 | } catch (err) { |
205 | self.log("could not complete final step: " + err, "error"); | 205 | self.log("could not complete final step: " + err, "error"); |
206 | } | 206 | } |
... | @@ -634,7 +634,7 @@ | ... | @@ -634,7 +634,7 @@ |
634 | }, this.options.stepTimeout, this, new Date().getTime(), this.step); | 634 | }, this.options.stepTimeout, this, new Date().getTime(), this.step); |
635 | } | 635 | } |
636 | try { | 636 | try { |
637 | stepResult = step(this); | 637 | stepResult = step.call(this, this); |
638 | } catch (e) { | 638 | } catch (e) { |
639 | if (this.options.faultTolerant) { | 639 | if (this.options.faultTolerant) { |
640 | this.log("Step error: " + e, "error"); | 640 | this.log("Step error: " + e, "error"); | ... | ... |
-
Please register or sign in to post a comment