Builder: build type without prior registration

https://fedorahosted.org/freeipa/ticket/3235
This commit is contained in:
Petr Vobornik
2013-04-15 15:15:26 +02:00
parent 30276e6983
commit eee43395dd

View File

@@ -175,14 +175,14 @@ define(['dojo/_base/declare',
cs.pre_ops = cs.pre_ops || []; cs.pre_ops = cs.pre_ops || [];
cs.post_ops = cs.post_ops || []; cs.post_ops = cs.post_ops || [];
if (pre) cs.pre_ops.push.call(cs.pre_ops, pre); if (pre) cs.pre_ops.push.call(cs.pre_ops, pre);
if (pre) cs.post_ops.push.call(cs.post_ops, post); if (post) cs.post_ops.push.call(cs.post_ops, post);
cs.spec = cs.spec || {}; }
cs.spec = cs.spec || {};
if (!cs.factory && !cs.ctor) { if (!cs.factory && !cs.ctor) {
if (this.ctor) cs.ctor = this.ctor; if (this.ctor) cs.ctor = this.ctor;
else if (this.factory) cs.factory = this.factory; else if (this.factory) cs.factory = this.factory;
} }
}
return cs; return cs;
}, },
@@ -194,7 +194,7 @@ define(['dojo/_base/declare',
if (this.registry) { if (this.registry) {
var cs = this.registry.get(type); var cs = this.registry.get(type);
if (!cs) throw construct.no_cs_for_type_error(type); if (!cs) cs = {};
cs = construct.clone(cs); cs = construct.clone(cs);
return cs; return cs;
} else { } else {