repos / starfx

supercharged async flow control library.
git clone https://github.com/neurosnap/starfx.git

commit
9bffca8
parent
ed175e3
author
Eric Bower
date
2023-09-16 16:18:57 +0000 UTC
fix(redux): dispatchActions needs batchActions
1 files changed,  +7, -2
M redux/query.ts
+7, -2
 1@@ -1,4 +1,9 @@
 2-import { createLoaderTable, createReducerMap, createTable } from "../deps.ts";
 3+import {
 4+  batchActions,
 5+  createLoaderTable,
 6+  createReducerMap,
 7+  createTable,
 8+} from "../deps.ts";
 9 import { compose } from "../compose.ts";
10 export { defaultLoader, defaultLoaderItem } from "../store/mod.ts";
11 import { ApiCtx, createKey, Next } from "../query/mod.ts";
12@@ -55,7 +60,7 @@ export function* dispatchActions(ctx: { actions: AnyAction[] }, next: Next) {
13   if (!ctx.actions) ctx.actions = [];
14   yield* next();
15   if (ctx.actions.length === 0) return;
16-  yield* put(ctx.actions);
17+  yield* put(batchActions(ctx.actions));
18 }
19 
20 /**