@rebasepro/common 0.0.1-canary.bbcb8b4 → 0.0.1-canary.c53f5db
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.
package/dist/index.es.js
CHANGED
|
@@ -1495,7 +1495,7 @@ function applyPropertyConditions(property, context) {
|
|
|
1495
1495
|
result.path = evaluateCondition(conditions.referencePath, context);
|
|
1496
1496
|
}
|
|
1497
1497
|
if (conditions.referenceFilter) {
|
|
1498
|
-
result.
|
|
1498
|
+
result.fixedFilter = evaluateCondition(conditions.referenceFilter, context);
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
if (result.type === "array") {
|
|
@@ -1823,7 +1823,10 @@ class CollectionRegistry {
|
|
|
1823
1823
|
if (!relation) {
|
|
1824
1824
|
throw new Error(`Relation '${relationKey}' not found in collection '${currentCollection.slug}'`);
|
|
1825
1825
|
}
|
|
1826
|
-
|
|
1826
|
+
const target = relation.target();
|
|
1827
|
+
const targetRelationKey = relation.relationName || target.slug;
|
|
1828
|
+
const targetSlug = relation.overrides?.slug ?? targetRelationKey;
|
|
1829
|
+
currentCollection = this.get(targetSlug) || this.normalizeCollection(target);
|
|
1827
1830
|
if (i + 1 < pathSegments.length) ;
|
|
1828
1831
|
}
|
|
1829
1832
|
return currentCollection;
|
|
@@ -1872,7 +1875,7 @@ class CollectionRegistry {
|
|
|
1872
1875
|
if (!subcollection) {
|
|
1873
1876
|
throw new Error(`Subcollection '${subcollectionSlug}' not found in ${currentCollection.slug}`);
|
|
1874
1877
|
}
|
|
1875
|
-
currentCollection = subcollection;
|
|
1878
|
+
currentCollection = this.get(subcollection.slug) || this.normalizeCollection(subcollection);
|
|
1876
1879
|
collections.push(currentCollection);
|
|
1877
1880
|
}
|
|
1878
1881
|
}
|