Skip to content

Commit

Permalink
avoid .unresolved() in promises method
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Dec 2, 2024
1 parent 4e2d996 commit 5189d4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/promises.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ as.promise.mirai <- function(x) {

if (is.null(promise)) {

promise <- if (.unresolved(x)) {
promise <- if (unresolved(x)) {
promises::promise(
function(resolve, reject) .keep(x, environment())
)$then(
Expand All @@ -78,7 +78,7 @@ as.promise.mirai <- function(x) {
value
)
} else {
value <- collect_aio(x)
value <- .subset2(x, "value")
promises::promise(
function(resolve, reject)
if (is_error_value(value) && !is_mirai_interrupt(value))
Expand Down

0 comments on commit 5189d4f

Please sign in to comment.