From b4e588627ce83f1ee352f8f7c44448ba530ff7f6 Mon Sep 17 00:00:00 2001 From: Nathan Date: Thu, 12 Aug 2021 10:39:53 -0400 Subject: [PATCH] Adding await to return within try Co-authored-by: Antoine <73850194+Antoineeeee-tech@users.noreply.github.com> --- lib/env/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/env/config.js b/lib/env/config.js index 4542627..5ff4a30 100644 --- a/lib/env/config.js +++ b/lib/env/config.js @@ -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));