@contentful/experiences-core 1.30.0-dev-20250129T1011-3298201.0 → 1.30.0
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.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3570,22 +3570,22 @@ const fetchReferencedEntities = async ({ client, experienceEntry, locale, }) =>
|
|
|
3570
3570
|
throw new Error('Failed to fetch experience entities. Provided "experienceEntry" does not match experience entry schema');
|
|
3571
3571
|
}
|
|
3572
3572
|
const deepReferences = gatherDeepReferencesFromExperienceEntry(experienceEntry);
|
|
3573
|
-
const entryIds =
|
|
3574
|
-
const assetIds =
|
|
3573
|
+
const entryIds = new Set();
|
|
3574
|
+
const assetIds = new Set();
|
|
3575
3575
|
for (const dataBinding of Object.values(experienceEntry.fields.dataSource)) {
|
|
3576
3576
|
if (!('sys' in dataBinding)) {
|
|
3577
3577
|
continue;
|
|
3578
3578
|
}
|
|
3579
3579
|
if (dataBinding.sys.linkType === 'Entry') {
|
|
3580
|
-
entryIds.
|
|
3580
|
+
entryIds.add(dataBinding.sys.id);
|
|
3581
3581
|
}
|
|
3582
3582
|
if (dataBinding.sys.linkType === 'Asset') {
|
|
3583
|
-
assetIds.
|
|
3583
|
+
assetIds.add(dataBinding.sys.id);
|
|
3584
3584
|
}
|
|
3585
3585
|
}
|
|
3586
3586
|
const [entriesResponse, assetsResponse] = await Promise.all([
|
|
3587
|
-
fetchAllEntries({ client, ids: entryIds, locale }),
|
|
3588
|
-
fetchAllAssets({ client, ids: assetIds, locale }),
|
|
3587
|
+
fetchAllEntries({ client, ids: [...entryIds], locale }),
|
|
3588
|
+
fetchAllAssets({ client, ids: [...assetIds], locale }),
|
|
3589
3589
|
]);
|
|
3590
3590
|
const { autoFetchedReferentAssets, autoFetchedReferentEntries } = gatherAutoFetchedReferentsFromIncludes(deepReferences, entriesResponse);
|
|
3591
3591
|
// Using client getEntries resolves all linked entry references, so we do not need to resolve entries in usedComponents
|