From 2de55df939e356f7f5a98d3226fa45ff873524ad Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Mon, 15 Jul 2013 10:44:34 -0700 Subject: [PATCH] Fix extend by using util.inherits --- lib/model-builder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/model-builder.js b/lib/model-builder.js index 4fd1009b..c622e45e 100644 --- a/lib/model-builder.js +++ b/lib/model-builder.js @@ -135,9 +135,9 @@ ModelBuilder.prototype.define = function defineClass(className, properties, sett for (var i in ModelBaseClass) { ModelClass[i] = ModelBaseClass[i]; } - for (var j in ModelBaseClass.prototype) { - ModelClass.prototype[j] = ModelBaseClass.prototype[j]; - } + + util.inherits(ModelClass, ModelBaseClass); + ModelClass.getter = {}; ModelClass.setter = {}; standartize(properties, settings);