@statezero/core 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.
@@ -134,7 +134,7 @@ export class QuerysetStore {
134
134
  let result;
135
135
  if (this.getRootStore && typeof this.getRootStore === "function" && !this.isTemp) {
136
136
  const { isRoot, rootStore } = this.getRootStore(this.queryset);
137
- if (!isRoot && rootStore) {
137
+ if (!isRoot && rootStore && rootStore.lastSync) {
138
138
  result = this.renderFromRoot(optimistic, rootStore);
139
139
  }
140
140
  }
@@ -203,7 +203,7 @@ export class QuerysetStore {
203
203
  // Check if we're delegating to a root store
204
204
  if (this.getRootStore && typeof this.getRootStore === "function" && !this.isTemp) {
205
205
  const { isRoot, rootStore } = this.getRootStore(this.queryset);
206
- if (!isRoot && rootStore) {
206
+ if (!isRoot && rootStore && rootStore.lastSync) {
207
207
  // We're delegating to a root store - don't sync, just mark as needing sync
208
208
  console.log(`[${id}] Delegating to root store, marking sync needed.`);
209
209
  this.needsSync = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
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",