From ac5c45906f98fe04e79a33da930d699a9497bb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 14 Oct 2013 23:37:43 +0200 Subject: [PATCH] Update to latest straps.js, with changed Base.create() method. --- bower.json | 2 +- src/core/Base.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 7207b2cd..52ec59a1 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,7 @@ "test" ], "devDependencies": { - "straps": "~1.1.5", + "straps": "~1.2.0", "acorn": "git://github.com/paperjs/acorn#0.3.2", "esprima": "~1.0.3", "stats.js": "r11" diff --git a/src/core/Base.js b/src/core/Base.js index ec5be099..7ba31f27 100644 --- a/src/core/Base.js +++ b/src/core/Base.js @@ -179,7 +179,7 @@ Base.inject(/** @lends Base# */{ list._index = index + 1; return obj && options && options.clone ? obj.clone() : obj; } - obj = Base.create(this); + obj = Base.create(this.prototype); if (readIndex) obj.__read = true; // If options were provided, pass them on to the constructed object @@ -399,7 +399,7 @@ Base.inject(/** @lends Base# */{ // Create serialized type and pass collected arguments to // constructor(). var args = res; - res = Base.create(type); + res = Base.create(type.prototype); type.apply(res, args); } } else if (Base.isPlainObject(obj)) {