From 95c14fa97dd201f93338efd02b0b30d29700c831 Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Tue, 8 Oct 2013 15:48:17 -0700 Subject: [PATCH] Fix EventEmitter mixin --- lib/model-builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model-builder.js b/lib/model-builder.js index bdb842cb..3519e943 100644 --- a/lib/model-builder.js +++ b/lib/model-builder.js @@ -118,7 +118,7 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett // mix in EventEmitter (don't inherit from) var events = new EventEmitter(); for (var f in EventEmitter.prototype) { - if (typeof EventEmitter.prototype[f]) { + if (typeof EventEmitter.prototype[f] === 'function') { ModelClass[f] = events[f].bind(events); } }