repos / starfx

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

commit
9775bca
parent
654cbc5
author
Eric Bower
date
2024-01-08 16:24:40 +0000 UTC
fix(loader): dont save derived data inside slice
1 files changed,  +3, -3
M store/slice/loader.ts
+3, -3
 1@@ -143,7 +143,7 @@ export const createLoader = <
 2     initialState,
 3     start: (e) => (s) => {
 4       const table = selectors.selectTable(s);
 5-      const loader = selectors.selectById(s, { id: e.id });
 6+      const loader = table[e.id];
 7       table[e.id] = {
 8         ...loader,
 9         ...e,
10@@ -153,7 +153,7 @@ export const createLoader = <
11     },
12     success: (e) => (s) => {
13       const table = selectors.selectTable(s);
14-      const loader = selectors.selectById(s, { id: e.id });
15+      const loader = table[e.id];
16       table[e.id] = {
17         ...loader,
18         ...e,
19@@ -163,7 +163,7 @@ export const createLoader = <
20     },
21     error: (e) => (s) => {
22       const table = selectors.selectTable(s);
23-      const loader = selectors.selectById(s, { id: e.id });
24+      const loader = table[e.id];
25       table[e.id] = {
26         ...loader,
27         ...e,