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

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() {
var CustomEventEmitter = function(fct) {
this.fct = fct;
var self = this;
}
util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() {
var self = this;
process.nextTick(function() {
if (self.fct) {
self.fct.call(self, self)
}
}.bind(this));
}
util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() {
var self = this
return this
return this;
}
CustomEventEmitter.prototype.success =
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!