mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 17:51:33 +00:00
Change Function::apply
to catch the result
We don't know whether it'll throw or not!
This commit is contained in:
@ -20,7 +20,7 @@ fn apply() {
|
||||
args.push(1.into());
|
||||
args.push(2.into());
|
||||
args.push(3.into());
|
||||
assert_eq!(MAX.apply(&JsValue::undefined(), &args), 3);
|
||||
assert_eq!(MAX.apply(&JsValue::undefined(), &args).unwrap(), 3);
|
||||
|
||||
let arr = JsValue::from(Array::new());
|
||||
let args = Array::new();
|
||||
|
Reference in New Issue
Block a user