Skip to content

Commit

Permalink
Fix issue with stored immediate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rscarson committed Aug 8, 2024
1 parent d88559e commit 953dfa3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "rustyscript"
description = "Effortless JS Integration for Rust"
edition = "2021"
license = "MIT OR Apache-2.0"
version = "0.8.2"
version = "0.8.3"
repository = "https://github.com/rscarson/rustyscript"

keywords = ["rust", "javascript", "deno", "runtime", "embedding"]
Expand Down
8 changes: 3 additions & 5 deletions src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,9 @@ impl Runtime {
T: deno_core::serde::de::DeserializeOwned,
{
let function = function.as_global(&mut self.deno_runtime().handle_scope());
let result = self.run_async_task(|runtime| async move {
runtime
.inner
.call_function_by_ref(module_context, &function, args)
})?;
let result = self
.inner
.call_function_by_ref(module_context, &function, args)?;
self.inner.decode_value(result)
}

Expand Down

0 comments on commit 953dfa3

Please sign in to comment.