@cascateer/core 2.4.26 → 2.4.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/store.ts +6 -4
package/package.json
CHANGED
package/src/store.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EndoFunction, ExtendableDictionary } from "@cascateer/lib";
|
|
2
2
|
import { flatMap, reduce } from "@cascateer/lib/observables";
|
|
3
3
|
import assert from "assert";
|
|
4
|
-
import { constant, Dictionary, mapValues, tap } from "lodash";
|
|
4
|
+
import { constant, Dictionary, mapValues, noop, tap } from "lodash";
|
|
5
5
|
import {
|
|
6
6
|
merge,
|
|
7
7
|
mergeMap,
|
|
@@ -230,13 +230,15 @@ export class StoreProvider<Data> extends ExtendableStoreAdapter<
|
|
|
230
230
|
return action.predicate();
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
assert(action.previousId
|
|
233
|
+
assert(action.previousId === previousAction?.id);
|
|
234
234
|
|
|
235
|
-
return tap(
|
|
236
|
-
action.
|
|
235
|
+
return tap(
|
|
236
|
+
action.predicate(previousState),
|
|
237
|
+
action.callback ?? noop,
|
|
237
238
|
);
|
|
238
239
|
},
|
|
239
240
|
(action) => (
|
|
241
|
+
console.log(action),
|
|
240
242
|
assert(action.type === "seedAction"),
|
|
241
243
|
action.predicate()
|
|
242
244
|
),
|