as-model 0.1.22 → 0.1.23

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/dist/index.js CHANGED
@@ -621,7 +621,7 @@
621
621
  if (u.isDestroyed) {
622
622
  return u;
623
623
  }
624
- if (!u.initialized && !("state" in args)) {
624
+ if (!u.initialized && !hasState && !hasInitialState) {
625
625
  throw new Error("The updater has not been initialized, it should be updated with a state for initializing.");
626
626
  }
627
627
  if (isInitialize) {
@@ -53,7 +53,7 @@ function createUpdateFn(updater, middleWare) {
53
53
  if (u.isDestroyed) {
54
54
  return u;
55
55
  }
56
- if (!u.initialized && !("state" in args)) {
56
+ if (!u.initialized && !hasState && !hasInitialState) {
57
57
  throw new Error(
58
58
  "The updater has not been initialized, it should be updated with a state for initializing."
59
59
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "as-model",
4
- "version": "0.1.22",
4
+ "version": "0.1.23",
5
5
  "description": "This is a model state management tool",
6
6
  "license": "MIT",
7
7
  "author": "Jimmy.Harding",