Builder: allow registration without factory or ctor

https://fedorahosted.org/freeipa/ticket/3235
This commit is contained in:
Petr Vobornik committed 2013-05-06 16:22:28 +02:00
1 parent ac1850a8f0
commit 08a5e2c0ca
1 file changed
-4
@@ -181,10 +181,6 @@ define(['dojo/_base/declare',
if (typeof spec.type !== 'string' || spec.type === '') {
throw 'Argument exception: Invalid type';
}
if (typeof spec.factory !== 'function' &&
typeof spec.ctor !== 'function') {
throw 'Argument exception: No factory or ctor defined';
}
if (!lang.isArrayLike(spec.pre_ops)) {
throw 'Argument exception: Invalid pre_ops type.';
}