@statezero/core 0.1.26 → 0.1.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.
@@ -29,7 +29,9 @@ export class QuerysetStoreGraph {
29
29
  if (current.__parent) {
30
30
  const parentKey = current.__parent.semanticKey;
31
31
  this.graph.setNode(parentKey);
32
- this.graph.setEdge(currentKey, parentKey); // child -> parent
32
+ if (currentKey !== parentKey) {
33
+ this.graph.setEdge(currentKey, parentKey);
34
+ }
33
35
  current = current.__parent;
34
36
  }
35
37
  else {
@@ -181,7 +181,7 @@ export class QuerysetStore {
181
181
  typeof this.getRootStore === "function" &&
182
182
  !this.isTemp) {
183
183
  const { isRoot, rootStore } = this.getRootStore(this.queryset);
184
- if (!isRoot && rootStore && rootStore.lastSync) {
184
+ if (!isRoot && rootStore) {
185
185
  result = this.renderFromRoot(optimistic, rootStore);
186
186
  }
187
187
  }
@@ -252,7 +252,7 @@ export class QuerysetStore {
252
252
  typeof this.getRootStore === "function" &&
253
253
  !this.isTemp) {
254
254
  const { isRoot, rootStore } = this.getRootStore(this.queryset);
255
- if (!isRoot && rootStore && rootStore.lastSync) {
255
+ if (!isRoot && rootStore) {
256
256
  // We're delegating to a root store - don't sync, just mark as needing sync
257
257
  console.log(`[${id}] Delegating to root store, marking sync needed.`);
258
258
  this.needsSync = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
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",