Permalink
Browse files

fixed initial handling of serial emitters

  • Loading branch information...
1 parent e4a65df commit 8cdd3324b36d7b78cb67720908deedae7445f82b @sdepold committed Jul 1, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/query-chainer.js
View
@@ -15,7 +15,13 @@ module.exports = (function() {
this.eventEmitter = null
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) {

0 comments on commit 8cdd332

Please sign in to comment.