@contentful/experiences-visual-editor-react 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/renderApp.js CHANGED
@@ -44853,6 +44853,17 @@ class EntityStoreBase {
44853
44853
  resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
44854
44854
  entityToResolveFieldsFrom = entity; // we move up
44855
44855
  }
44856
+ else if (this.isAsset(fieldValue) || this.isEntry(fieldValue)) {
44857
+ resolvedFieldset.push([entityToResolveFieldsFrom, field, _localeQualifier]);
44858
+ entityToResolveFieldsFrom = fieldValue; // we move up
44859
+ }
44860
+ else {
44861
+ return {
44862
+ resolvedFieldset,
44863
+ isFullyResolved: false,
44864
+ reason: `Deep path points to an invalid field value of type '${typeof fieldValue}' (value=${fieldValue})`,
44865
+ };
44866
+ }
44856
44867
  }
44857
44868
  return {
44858
44869
  resolvedFieldset,
@@ -44878,8 +44889,17 @@ class EntityStoreBase {
44878
44889
  const [leafEntity] = resolvedFieldset[resolvedFieldset.length - 1];
44879
44890
  return leafEntity;
44880
44891
  }
44881
- isAsset(entity) {
44882
- return entity.sys.type === 'Asset';
44892
+ isAsset(value) {
44893
+ return (null !== value &&
44894
+ typeof value === 'object' &&
44895
+ 'sys' in value &&
44896
+ value.sys?.type === 'Asset');
44897
+ }
44898
+ isEntry(value) {
44899
+ return (null !== value &&
44900
+ typeof value === 'object' &&
44901
+ 'sys' in value &&
44902
+ value.sys?.type === 'Entry');
44883
44903
  }
44884
44904
  getEntity(type, id) {
44885
44905
  if (type === 'Asset') {