Skip to content

Commit

Permalink
chore: resolve m.default
Browse files Browse the repository at this point in the history
  • Loading branch information
2heal1 committed Jul 29, 2024
1 parent 4ad4f75 commit 8192b9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/server/core/src/adapters/node/plugins/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ const dynamicImport = (filePath: string) => {
if (module.default) {
return Promise.resolve(module.default);
}
return Promise.resolve(module);
return Promise.resolve(module).then(m => {
if (m.default) {
return m.default;
}
return m;
});
} catch (e) {
return Promise.reject(e);
}
Expand Down

0 comments on commit 8192b9d

Please sign in to comment.