Skip to content

Commit e52f5a0

Browse files
committed
fix product set calculation
1 parent ad3e741 commit e52f5a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/issue/page_view.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ def cover_html
155155
end
156156

157157
def product_set_html
158+
count = page.products.count == 9 ? 9 : [(page.products.count/2.0).ceil*2, 6].min
158159
container_class = 'product-set'
159-
container_class << " set-#{(page.products.to_a.count/2.0).ceil*2}"
160+
container_class << " set-#{count}"
160161
container_class << ' cover-area' unless page.cover
161162

162163
fragment = create_element('ul', :class => container_class) do |ul|

0 commit comments

Comments
 (0)