@contentful/experiences-core 1.40.1-dev-20250605T1324-83179af.0 → 1.40.1-dev-20250605T1509-fb1d2c5.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/entity/EntityStoreBase.d.ts +1 -0
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3302,6 +3302,17 @@ class EntityStoreBase {
|
|
|
3302
3302
|
resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
|
|
3303
3303
|
entityToResolveFieldsFrom = entity; // we move up
|
|
3304
3304
|
}
|
|
3305
|
+
else if (this.isAsset(fieldValue) || this.isEntry(fieldValue)) {
|
|
3306
|
+
resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
|
|
3307
|
+
entityToResolveFieldsFrom = fieldValue; // we move up
|
|
3308
|
+
}
|
|
3309
|
+
else {
|
|
3310
|
+
return {
|
|
3311
|
+
resolvedFieldset,
|
|
3312
|
+
isFullyResolved: false,
|
|
3313
|
+
reason: `Deep path points to an invalid field value of type '${typeof fieldValue}' (value=${fieldValue})`,
|
|
3314
|
+
};
|
|
3315
|
+
}
|
|
3305
3316
|
}
|
|
3306
3317
|
return {
|
|
3307
3318
|
resolvedFieldset,
|
|
@@ -3327,8 +3338,17 @@ class EntityStoreBase {
|
|
|
3327
3338
|
const [leafEntity] = resolvedFieldset[resolvedFieldset.length - 1];
|
|
3328
3339
|
return leafEntity;
|
|
3329
3340
|
}
|
|
3330
|
-
isAsset(
|
|
3331
|
-
return
|
|
3341
|
+
isAsset(value) {
|
|
3342
|
+
return (null !== value &&
|
|
3343
|
+
typeof value === 'object' &&
|
|
3344
|
+
'sys' in value &&
|
|
3345
|
+
value.sys?.type === 'Asset');
|
|
3346
|
+
}
|
|
3347
|
+
isEntry(value) {
|
|
3348
|
+
return (null !== value &&
|
|
3349
|
+
typeof value === 'object' &&
|
|
3350
|
+
'sys' in value &&
|
|
3351
|
+
value.sys?.type === 'Entry');
|
|
3332
3352
|
}
|
|
3333
3353
|
getEntity(type, id) {
|
|
3334
3354
|
if (type === 'Asset') {
|