Merge pull request #22 from strongloop/ee-mixin-fix
Fix EventEmitter mixin
This commit is contained in:
commit
4568797aec
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue