Skip to content

Commit 17f6f8e

Browse files
Fixed bad image check
`image_count` was renamed to `media_count` in Spree 5.4, however it's already redundant as `has_images?` already runs a proper check
1 parent df2ca16 commit 17f6f8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

storefront/app/views/themes/default/spree/products/_featured_image.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"w-full group-hover:opacity-0 transition-opacity duration-500 z-10 relative h-full bg-background product-card !max-h-full #{object_class}" :
1515
"w-full h-full !max-h-full #{object_class}" %>
1616
<%= spree_image_tag(object.primary_media, width: width, height: height, variant: :medium, loading: :lazy, alt: "#{object.name} #{Spree.t('storefront.products.primary_image', default: 'primary image')}", class: image_hover_class) %>
17-
<% if object.has_images? && object.image_count > 1 && object.secondary_image.present? && object.secondary_image.attached? %>
17+
<% if object.has_images? && object.secondary_image.present? && object.secondary_image.attached? %>
1818
<% secondary_image_class = "w-full absolute top-0 left-0 opacity-100 h-full !max-h-full #{object_class}" %>
1919
<%= spree_image_tag(object.secondary_image, width: width, height: height, variant: :medium, loading: :lazy, alt: "#{object.name} #{Spree.t('storefront.products.secondary_image', default: 'secondary image')}", class: secondary_image_class) %>
2020
<% end %>

0 commit comments

Comments
 (0)