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

Commit bb7a1fe5 by sdepold

fixed eventEmitter

1 parent c88b3796
Showing with 8 additions and 3 deletions
......@@ -89,17 +89,22 @@ module.exports = (function() {
var observeEmitter = function(emitter) {
var self = this
emitter
.success(function(){
.success(function() {
self.finishedEmits++
finish.call(self)
})
.error(function(err){
.error(function(err) {
self.finishedEmits++
self.fails.push(err)
finish.call(self)
})
.on('sql', function(sql){ self.eventEmitter.emit('sql', sql) })
.on('sql', function(sql) {
if(self.eventEmitter) {
self.eventEmitter.emit('sql', sql)
}
})
}
var finish = function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!