Skip to content

Commit

Permalink
one more promise method optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Oct 8, 2024
1 parent 12d26e0 commit 86baab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/promises.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ as.promise.mirai <- function(x) {
promises::promise(
function(resolve, reject) .keep(x, environment())
)$then(
onFulfilled = function(value)
onFulfilled = function(value, .visible)
if (is_error_value(value) && !is_mirai_interrupt(value))
stop(if (is_mirai_error(value)) value else nng_error(value)) else
value
Expand Down

0 comments on commit 86baab9

Please sign in to comment.