Skip to content

Commit

Permalink
Adding await to return within try
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine <73850194+Antoineeeee-tech@users.noreply.github.com>
  • Loading branch information
nathan-knight and Antoine committed Aug 12, 2021
1 parent 51dd3ae commit b4e5886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/env/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = {
}
const configPath = getConfigPath();
try {
return Promise.resolve(moduleLoader.require(configPath));
return await Promise.resolve(moduleLoader.require(configPath));
} catch (e) {
if (e.code === 'ERR_REQUIRE_ESM') {
const loadedImport = await moduleLoader.import(url.pathToFileURL(configPath));
Expand Down

0 comments on commit b4e5886

Please sign in to comment.