Permalink
Browse files

Small bugfix in removeListeners for array bounds

  • Loading branch information...
1 parent f6617da commit 00b968a6ed7c10fcdbabb712bc7e04d4c61c490b Drew Martin committed Dec 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/MongoMQ.js
View
@@ -407,7 +407,7 @@ MongoMQ.prototype.removeListeners = function(event, handler){
}
if(!(event||handler)) return false;
var found = false, listener;
- for(var i = l; i>-1; i--){
+ for(var i = l-1; i>-1; i--){
found = false;
listener = self.listeners[i];
if(event) found = (event==listener.event)||(listener.event=='*');

0 comments on commit 00b968a

Please sign in to comment.