From 0d5f385a1bbaabd1da03d6d7c98de6c7090ec932 Mon Sep 17 00:00:00 2001 From: thunderchen <853524319@qq.com> Date: Tue, 26 Dec 2023 17:17:53 +0800 Subject: [PATCH] add dispatch supports the form of Promise --- src/event-store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event-store.js b/src/event-store.js index ec05a54..4f00e90 100644 --- a/src/event-store.js +++ b/src/event-store.js @@ -101,7 +101,7 @@ class HYEventStore { throw new Error("this action name does not exist, please check it") } const actionFn = this.actions[actionName] - actionFn.apply(this, [this.state, ...args]) + return actionFn.apply(this, [this.state, ...args]) } }