Merge pull request #22 from strongloop/ee-mixin-fix

Fix EventEmitter mixin
This commit is contained in:
Ritchie Martori 2013-10-08 15:58:15 -07:00
commit 4568797aec
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett
// mix in EventEmitter (don't inherit from) // mix in EventEmitter (don't inherit from)
var events = new EventEmitter(); var events = new EventEmitter();
for (var f in EventEmitter.prototype) { for (var f in EventEmitter.prototype) {
if (typeof EventEmitter.prototype[f]) { if (typeof EventEmitter.prototype[f] === 'function') {
ModelClass[f] = events[f].bind(events); ModelClass[f] = events[f].bind(events);
} }
} }