@contentful/experiences-core 1.22.1-dev-20241113T0738-475e21a.0 → 1.23.0-dev-20241114T1253-46573c4.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 CHANGED
@@ -2950,7 +2950,7 @@ class EditorEntityStore extends EntityStoreBase {
2950
2950
  ...message.entities.map((entity) => entity.sys.id),
2951
2951
  ...(message.missingEntityIds ?? []),
2952
2952
  ];
2953
- if (missing.every((id) => messageIds.find((entityId) => entityId === id))) {
2953
+ if (missing.every((id) => messageIds.includes(id))) {
2954
2954
  clearTimeout(timeout);
2955
2955
  resolve(message.entities);
2956
2956
  this.cleanupPromise(cacheId);
@@ -2962,7 +2962,7 @@ class EditorEntityStore extends EntityStoreBase {
2962
2962
  }
2963
2963
  });
2964
2964
  const timeout = setTimeout(() => {
2965
- reject(new Error(`Request for entities timed out ${this.timeoutDuration}ms} for ${cacheId}`));
2965
+ reject(new Error(`Request for entities timed out ${this.timeoutDuration}ms for ${cacheId}`));
2966
2966
  this.cleanupPromise(cacheId);
2967
2967
  ids.forEach((id) => this.cleanupPromise(id));
2968
2968
  unsubscribe();
@@ -3075,10 +3075,7 @@ class EditorModeEntityStore extends EditorEntityStore {
3075
3075
  return;
3076
3076
  }
3077
3077
  const fieldValue = get(entity, path);
3078
- // walk around to render asset files
3079
- return fieldValue && typeof fieldValue == 'object' && fieldValue.url
3080
- ? fieldValue.url
3081
- : fieldValue;
3078
+ return transformAssetFileToUrl(fieldValue);
3082
3079
  }
3083
3080
  }
3084
3081