@postrun/react 2.14.0 → 2.16.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
@@ -930,9 +930,6 @@ function resourceFor(ref, fallback) {
930
930
  }
931
931
  return fallback?.find((asset) => asset.id === ref.media_id);
932
932
  }
933
- function renditionFor(asset, target) {
934
- return asset.per_platform[target];
935
- }
936
933
  function resolveVariantMedia(refs, target, fallback) {
937
934
  return (refs ?? []).flatMap((ref) => {
938
935
  const asset = resourceFor(ref, fallback);
@@ -946,7 +943,7 @@ function resolveVariantMedia(refs, target, fallback) {
946
943
  const alt = ref.alt_text_override ?? asset.alt_text ?? void 0;
947
944
  const width = asset.source?.width ?? void 0;
948
945
  const height = asset.source?.height ?? void 0;
949
- const rendition = renditionFor(asset, target);
946
+ const rendition = asset.per_platform[target];
950
947
  if (asset.status === "ready" && rendition?.status === "ready" && rendition.url) {
951
948
  return [
952
949
  {