Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for returning undefined in async functions #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

awestlake87
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant