Skip to content

Commit 1ed6e21

Browse files
committed
fixup! lib,src: cache ModuleWrap.hasAsyncGraph
1 parent 8cf0478 commit 1ed6e21

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/internal/modules/esm/module_job.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,7 @@ class ModuleJob extends ModuleJobBase {
327327
if (status === kUninstantiated) {
328328
// FIXME(joyeecheung): this cannot fully handle < kInstantiated. Make the linking
329329
// fully synchronous instead.
330-
if (this.module.getModuleRequests().length > 0) {
331-
const filename = urlToFilename(this.url);
332-
const parentFilename = urlToFilename(parent?.filename);
333-
throw new ERR_REQUIRE_ASYNC_MODULE(filename, parentFilename);
334-
}
330+
assert(this.module.getModuleRequests().length === 0);
335331
this.module.link([]);
336332
this.module.instantiate();
337333
status = this.module.getStatus();

0 commit comments

Comments
 (0)