Skip to content

Commit 460be4c

Browse files
committed
fix(ModuleManager): gracefully fail when there are no modules
1 parent 88d2215 commit 460be4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Library/ModuleManager/ModuleManager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ export class ModuleManager {
6969
public async loadModules (config: ModuleManagerConfigInterface): Promise<this> {
7070
debug('Loading modules');
7171

72+
if (!config) {
73+
debug('No modules registered.');
74+
75+
return;
76+
}
77+
7278
for(let i = 0; i < config.length; i++) {
7379
await this.loadModule(config[i]);
7480
}

0 commit comments

Comments
 (0)