From 98d184b0b80694d15fa78518b17adf09d86801a4 Mon Sep 17 00:00:00 2001 From: Mikael Karon Date: Mon, 18 Feb 2013 11:12:40 +0800 Subject: [PATCH] Fix .create. Closes troopjs/troopjs-core#70 (again) --- src/component/factory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/factory.js b/src/component/factory.js index 546a4dd..940e4eb 100644 --- a/src/component/factory.js +++ b/src/component/factory.js @@ -36,7 +36,7 @@ define([ "troopjs-utils/unique", "poly/object" ], function ComponentFactoryModul * @returns {*} */ function create() { - return this.apply(null, arguments); + return extend.apply(this, arguments)(); } /** @@ -348,7 +348,7 @@ define([ "troopjs-utils/unique", "poly/object" ], function ComponentFactoryModul // Add CREATE to factoryDescriptors factoryDescriptors[CREATE] = { "value" : function FactoryCreate() { - return Factory.apply(null, arguments).create(); + return Factory.apply(null, arguments)(); } };