Skip to content

Commit

Permalink
fix: carousel style when caching
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiulodro committed Oct 22, 2024
1 parent 54b10ee commit afb7f57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/class-newspack-blocks-caching.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ public static function maybe_serve_cached_block( $block_html, $block_data ) {
return $block_html;
}

Newspack_Blocks::enqueue_view_assets( 'homepage-articles' );
if ( 'newspack-blocks/homepage-articles' === $block_data['blockName'] ) {
Newspack_Blocks::enqueue_view_assets( 'homepage-articles' );
} elseif ( 'newspack-blocks/carousel' === $block_data['blockName'] ) {
Newspack_Blocks::enqueue_view_assets( 'carousel' );
}

return $cached_data['cached_content'];
}
Expand Down

0 comments on commit afb7f57

Please sign in to comment.