Skip to content

Commit 7b3abdb

Browse files
author
Mehul Kar
committed
Fail explicitly when initializer does not have default export
1 parent b69de85 commit 7b3abdb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

addon/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ function resolveInitializer(moduleName: string) {
1313
throw new Error(moduleName + ' must export an initializer.');
1414
}
1515
var initializer = module['default'];
16+
if (!initializer) {
17+
throw new Error(moduleName + ' must have a default export');
18+
}
1619
if (!initializer.name) {
1720
initializer.name = moduleName.slice(moduleName.lastIndexOf('/') + 1);
1821
}

0 commit comments

Comments
 (0)