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

Commit 8cdd3324 by sdepold

fixed initial handling of serial emitters

1 parent e4a65dff
Showing with 7 additions and 1 deletions
...@@ -15,7 +15,13 @@ module.exports = (function() { ...@@ -15,7 +15,13 @@ module.exports = (function() {
this.eventEmitter = null this.eventEmitter = null
emitters = emitters || [] emitters = emitters || []
emitters.forEach(function(emitter) { self.add(emitter) }) emitters.forEach(function(emitter) {
if(Array.isArray(emitter)) {
self.add.apply(self, emitter)
} else {
self.add(emitter)
}
})
} }
QueryChainer.prototype.add = function(emitterOrKlass, method, params, options) { QueryChainer.prototype.add = function(emitterOrKlass, method, params, options) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!