Skip to content

Commit

Permalink
Bail early, if the asset is not ready
Browse files Browse the repository at this point in the history
  • Loading branch information
pereirinha committed Nov 26, 2024
1 parent 21f4b36 commit 7d9b7fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion php/class-delivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,13 @@ public function convert_tags( $content, $context = 'view' ) {
$aliases[ $local_url ] = $cached[ $local_url ];
continue;
}
$cloudinary_url = $this->media->cloudinary_url( $relation['post_id'], explode( 'x', $size ), $relation['transformations'], $public_id );

$cloudinary_url = $this->media->cloudinary_url( $relation['post_id'], explode( 'x', $size ), $relation['transformations'], $public_id );
// The asset is not ready. Carry on.
if ( empty( $cloudinary_url ) ) {
continue;
}

$aliases[ $local_url . '?' ] = $cloudinary_url . '&';
$aliases[ $local_url ] = $cloudinary_url;

Expand Down

0 comments on commit 7d9b7fa

Please sign in to comment.