Permalink
Browse files

Small fixes to the has method, and some jshinting

  • Loading branch information...
1 parent 0e940f1 commit 1521291cf0fe3c1ca43a7a30a263acd1b37cab1b @3rd-Eden 3rd-Eden committed Feb 10, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/index.js
View
@@ -67,7 +67,7 @@
if (typeof this._events[event] == 'function')
return fn === this._events[event];
- this._events[event].indexOf(fn) >= 0;
+ return this._events[event].indexOf(fn) >= 0;
}
return false;
@@ -199,7 +199,7 @@
* @api public
*/
- var emit = EventEmitter.prototype.emit;
+ var emitter = EventEmitter.prototype.emit;
/**
* Override the emit method so we can implement a catch all method.
@@ -209,12 +209,12 @@
* @api public
*/
- EventEmitter.prototype.emit = function emitter (event) {
+ EventEmitter.prototype.emit = function emit (event) {
// the build in emit returns true or false it was able to emit the event to
// a listener
- if (!emit.apply(this, arguments)) {
+ if (!emitter.apply(this, arguments)) {
if (event !== 'newListener') {
- emit.apply(this, concat.apply(['uncaught'], arguments));
+ emitter.apply(this, concat.apply(['uncaught'], arguments));
}
return false;
@@ -234,4 +234,4 @@
exports.version = '0.0.5';
}
-})();
+})();

0 comments on commit 1521291

Please sign in to comment.