entropic-bond 1.51.9 → 1.51.11

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.
@@ -320,7 +320,12 @@ const M = (d = class {
320
320
  }
321
321
  toReferenceObj(e, t) {
322
322
  const r = this[e.name];
323
- return Array.isArray(r) ? r.map((s) => (e.isPureReference || this.pushDocument(t, d.collectionPath(s, e), s), this.buildRefObject(s, d.collectionPath(s, e), e.cachedProps))) : (e.isPureReference || this.pushDocument(t, d.collectionPath(r, e), r), this.buildRefObject(r, d.collectionPath(r, e), e.cachedProps));
323
+ if (Array.isArray(r)) {
324
+ if (e.cachedProps)
325
+ throw new Error("Cached props are not allowed in array references");
326
+ return r.map((s) => (e.isPureReference || this.pushDocument(t, d.collectionPath(s, e), s), this.buildRefObject(s, d.collectionPath(s, e), e.cachedProps)));
327
+ } else
328
+ return e.isPureReference || this.pushDocument(t, d.collectionPath(r, e), r), this.buildRefObject(r, d.collectionPath(r, e), e.cachedProps);
324
329
  }
325
330
  buildRefObject(e, t, r) {
326
331
  const s = r == null ? void 0 : r.reduce((n, o) => (e[o] !== void 0 && (n[o] = e[o]), n), {});