fix empty Component using Component.create()

This commit is contained in:
David Greenspan
2013-05-27 20:17:43 -07:00
parent 762841cf0e
commit 19568674bd

View File

@@ -485,7 +485,8 @@ _.extend(Component.prototype, {
Component.create = function (/*args*/) {
constructorsLocked = false;
var comp = new this;
Component.apply(comp, arguments);
if (this !== Component)
Component.apply(comp, arguments);
return comp;
};