Skip to content

Commit

Permalink
fix: use of default export for data-source search
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Mar 13, 2023
1 parent f426185 commit 66eddf0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/data-source/find/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ export async function findDataSource(
}

const defaultExport = getModuleExport(fileExports);

if (InstanceChecker.isDataSource(defaultExport.value)) {
return fileExports.default;
if (
defaultExport &&
InstanceChecker.isDataSource(defaultExport.value)
) {
return defaultExport.value;
}

if (isObject(fileExports)) {
Expand Down

0 comments on commit 66eddf0

Please sign in to comment.