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 4b34b2e commit 95f6467Copy full SHA for 95f6467
lib/internal/loader/ModuleJob.js
@@ -50,10 +50,11 @@ class ModuleJob {
50
}
51
52
async instantiate() {
53
- if (this.instantiated) {
54
- return this.instantiated;
+ if (!this.instantiated) {
+ return this.instantiated = this._instantiate();
55
56
- return this.instantiated = this._instantiate();
+ await this.instantiated;
57
+ return this.module;
58
59
60
// 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