From 0e0c7d8d17df1fe3a5579a6b40c949f6628d5795 Mon Sep 17 00:00:00 2001 From: apendua Date: Tue, 23 Apr 2013 09:45:20 +0200 Subject: [PATCH] changed prototype creation logic --- hoop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoop.js b/hoop.js index 7f4cac3..7c434a4 100644 --- a/hoop.js +++ b/hoop.js @@ -1,5 +1,5 @@ GLOBAL.$extends = function(child, parent) { - child.prototype = new parent; + child.prototype = Object.create(parent.prototype); child.prototype.constructor = child; child.prototype.super = parent.prototype; }