Skip to content

Commit

Permalink
Merge pull request #278 from mehulkar/mk/explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Nov 6, 2020
2 parents b69de85 + 7b3abdb commit 168ed4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ function resolveInitializer(moduleName: string) {
throw new Error(moduleName + ' must export an initializer.');
}
var initializer = module['default'];
if (!initializer) {
throw new Error(moduleName + ' must have a default export');
}
if (!initializer.name) {
initializer.name = moduleName.slice(moduleName.lastIndexOf('/') + 1);
}
Expand Down

0 comments on commit 168ed4c

Please sign in to comment.