mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
Fix JsImportObject resolver
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user