diff options
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index f358cf05e..04c6ca1af 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -784,15 +784,9 @@ impl JsRuntime { module.get_status() }; - // Since the same module might be dynamically imported more than once, - // we short-circuit is it is already evaluated. - if status == v8::ModuleStatus::Evaluated { - self.dyn_import_done(load_id, id); - return Ok(()); - } - - if status != v8::ModuleStatus::Instantiated { - return Ok(()); + match status { + v8::ModuleStatus::Instantiated | v8::ModuleStatus::Evaluated => {} + _ => return Ok(()), } // IMPORTANT: Top-level-await is enabled, which means that return value |