Fix JsImportObject resolver

This commit is contained in:
Yuta Saito
2022-03-27 16:17:31 +00:00
parent a8a3412555
commit e09cf07176
2 changed files with 4 additions and 1 deletions

View File

@@ -8,6 +8,9 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C
## **Unreleased**
### Fixed
- [#2828](https://github.com/wasmerio/wasmer/pull/2828) Fix JsImportObject resolver.
## 2.2.1 - 2022/03/15
### Fixed

View File

@@ -50,7 +50,7 @@ impl JsImportObject {
/// import_object.get_export("module", "name");
/// ```
pub fn get_export(&self, module: &str, name: &str) -> Option<Export> {
let namespace = js_sys::Reflect::get(&self.object, &name.into()).ok()?;
let namespace = js_sys::Reflect::get(&self.object, &module.into()).ok()?;
let js_export = js_sys::Reflect::get(&namespace, &name.into()).ok()?;
match self
.module_imports