quickjs-rs
quickjs-rs copied to clipboard
Added support for returning undefined in async functions
Currently quickjs-rs is not able to handle async functions that return undefined. Functions like async () => { }
or async () => undefined
will throw the following error:
failures:
---- tests::test_async_fn_returning_undefined stdout ----
thread 'tests::test_async_fn_returning_undefined' panicked at 'called `Result::unwrap()` on an `Err` value: Internal("Property '__promiseValue' not found")', src/tests.rs:629:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This PR allows __promiseValue
to be undefined when __promiseResult === true