summaryrefslogtreecommitdiff
path: root/lib/internal/modules/esm/module_job.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/modules/esm/module_job.js')
-rw-r--r--lib/internal/modules/esm/module_job.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/internal/modules/esm/module_job.js b/lib/internal/modules/esm/module_job.js
index 6f265ed460..ef11e2ec83 100644
--- a/lib/internal/modules/esm/module_job.js
+++ b/lib/internal/modules/esm/module_job.js
@@ -30,19 +30,17 @@ class ModuleJob {
// onto `this` by `link()` below once it has been resolved.
this.modulePromise = moduleProvider.call(loader, url, isMain);
this.module = undefined;
- this.reflect = undefined;
// Wait for the ModuleWrap instance being linked with all dependencies.
const link = async () => {
- ({ module: this.module,
- reflect: this.reflect } = await this.modulePromise);
+ this.module = await this.modulePromise;
assert(this.module instanceof ModuleWrap);
const dependencyJobs = [];
const promises = this.module.link(async (specifier) => {
const jobPromise = this.loader.getModuleJob(specifier, url);
dependencyJobs.push(jobPromise);
- return (await (await jobPromise).modulePromise).module;
+ return (await jobPromise).modulePromise;
});
if (promises !== undefined)