From 5189d4fb748c3a2199aeb8561cf5f16c38b951b2 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:55:53 +0000 Subject: [PATCH] avoid .unresolved() in promises method --- R/promises.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/promises.R b/R/promises.R index e8213a0fc..fbfc55286 100644 --- a/R/promises.R +++ b/R/promises.R @@ -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( @@ -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))