From cdc872be3f6e7c3cf1f3a3b65023569bb6fa5e2d Mon Sep 17 00:00:00 2001 From: * <*> Date: Mon, 16 Jan 2023 20:04:55 +0800 Subject: [PATCH 1/2] Match-id-a889c6b66e320203447be4d1bcf1011b502b27c4 --- libs/horizon/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/horizon/index.ts b/libs/horizon/index.ts index 59045fbb..f71aa9e6 100644 --- a/libs/horizon/index.ts +++ b/libs/horizon/index.ts @@ -65,6 +65,11 @@ const act = fun => { asyncUpdates(fun); callRenderQueueImmediate(); runAsyncEffects(); + + // 兼容返回Promise + return new Promise((resolve, reject) => { + resolve(null); + }); }; import { From 2aaad576fd2eabefa8eccee6847c0198cf31772a Mon Sep 17 00:00:00 2001 From: * <*> Date: Mon, 16 Jan 2023 20:29:01 +0800 Subject: [PATCH 2/2] Match-id-13432ea7f850d2d66d77c7fc83bbaf071859351f --- libs/horizon/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/horizon/index.ts b/libs/horizon/index.ts index f71aa9e6..737861a7 100644 --- a/libs/horizon/index.ts +++ b/libs/horizon/index.ts @@ -67,9 +67,7 @@ const act = fun => { runAsyncEffects(); // 兼容返回Promise - return new Promise((resolve, reject) => { - resolve(null); - }); + return Promise.resolve(); }; import {