Correct edge case with 'module' key
This commit is contained in:
parent
b0cb253987
commit
5ac95161e2
|
@ -19,14 +19,15 @@ function testMode() {
|
|||
module.exports = function Initializer(type, opts) {
|
||||
var mod;
|
||||
|
||||
if (opts.module) {
|
||||
mod = Registry.register(opts.module);
|
||||
} else {
|
||||
mod = Registry.findBy(type, opts[type]);
|
||||
}
|
||||
mod = Registry.findBy(type, opts[type]);
|
||||
|
||||
if (!mod) {
|
||||
Registry.register("cylon-" + opts[type]);
|
||||
if (opts.module) {
|
||||
Registry.register(opts.module);
|
||||
} else {
|
||||
Registry.register("cylon-" + opts[type]);
|
||||
}
|
||||
|
||||
mod = Registry.findBy(type, opts[type]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue