@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/store.ts +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cascateer/core",
3
- "version": "2.4.26",
3
+ "version": "2.4.28",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cascateer/core.git"
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 !== previousAction?.id);
233
+ assert(action.previousId === previousAction?.id);
234
234
 
235
- return tap(action.predicate(previousState), (state) =>
236
- action.callback?.call(null, state),
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
  ),