不要怂,就是干,撸起袖子干!

Commit dca436ec by Michael Weibel

Move process.nextTick() to run() method

Hope this fixes the tests. Thanks @janmeier
1 parent 3d8bce57
Showing with 7 additions and 5 deletions
...@@ -5,17 +5,19 @@ module.exports = (function() { ...@@ -5,17 +5,19 @@ module.exports = (function() {
var CustomEventEmitter = function(fct) { var CustomEventEmitter = function(fct) {
this.fct = fct; this.fct = fct;
var self = this; var self = this;
}
util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() {
var self = this;
process.nextTick(function() { process.nextTick(function() {
if (self.fct) { if (self.fct) {
self.fct.call(self, self) self.fct.call(self, self)
} }
}.bind(this)); }.bind(this));
}
util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() { return this;
var self = this
return this
} }
CustomEventEmitter.prototype.success = CustomEventEmitter.prototype.success =
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!