We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bdc18c commit 881ae75Copy full SHA for 881ae75
lib/internal/loader/ModuleJob.js
@@ -53,10 +53,11 @@ class ModuleJob {
53
}
54
55
async instantiate() {
56
- if (this.instantiated) {
57
- return this.instantiated;
+ if (!this.instantiated) {
+ return this.instantiated = this._instantiate();
58
59
- return this.instantiated = this._instantiate();
+ await this.instantiated;
60
+ return this.module;
61
62
63
// This method instantiates the module associated with this job and its
test/es-module/test-esm-cyclic-dynamic-import.mjs
@@ -0,0 +1,3 @@
1
+// Flags: --experimental-modules
2
+import '../common';
3
+import('./test-esm-cyclic-dynamic-import');
0 commit comments