@statezero/core 0.1.15 → 0.1.16

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.
@@ -84,7 +84,7 @@ export class Model {
84
84
  // check local overrides
85
85
  let value = this._data[field];
86
86
  // if its not been overridden, get it from the store
87
- if (isNil(value) && !isNil(this._pk)) {
87
+ if (value === undefined && !isNil(this._pk)) {
88
88
  let storedValue = modelStoreRegistry.getEntity(ModelClass, this._pk);
89
89
  if (storedValue)
90
90
  value = storedValue[field]; // if stops null -> undefined
@@ -186,7 +186,7 @@ export class Model {
186
186
  // check local overrides
187
187
  let value = this._data[field];
188
188
  // if it's not been overridden, get it from the store
189
- if (isNil(value) && !isNil(this._pk)) {
189
+ if (value === undefined && !isNil(this._pk)) {
190
190
  let storedValue = modelStoreRegistry.getEntity(ModelClass, this._pk);
191
191
  if (storedValue)
192
192
  value = storedValue[field];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "module": "ESNext",
6
6
  "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",