Skip to content

Commit

Permalink
Readability change
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 authored Jun 16, 2021
1 parent 216d086 commit 51dd3ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/env/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ module.exports = {
return Promise.resolve(moduleLoader.require(configPath));
} catch (e) {
if (e.code === 'ERR_REQUIRE_ESM') {
return (await moduleLoader.import(url.pathToFileURL(configPath))).default;
const loadedImport = await moduleLoader.import(url.pathToFileURL(configPath));
return loadedImport.default
}
throw e;
}
Expand Down

0 comments on commit 51dd3ae

Please sign in to comment.