entropic-bond 1.51.12 → 1.51.13

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.
@@ -321,8 +321,8 @@ const M = (d = class {
321
321
  toReferenceObj(e, t) {
322
322
  const r = this[e.name];
323
323
  if (Array.isArray(r)) {
324
- if (e.cachedProps)
325
- throw new Error(`${this.className}.${e.name} is an array but cached props are not allowed in array references`);
324
+ if (e.cachedProps && !e.searchableArray)
325
+ throw new Error(`${this.className}.${e.name} is an array but cached array props are only allowed in searchable array references`);
326
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
327
  } else
328
328
  return e.isPureReference || this.pushDocument(t, d.collectionPath(r, e), r), this.buildRefObject(r, d.collectionPath(r, e), e.cachedProps);