diff --git a/themes/aura/sections/related-products.liquid b/themes/aura/sections/related-products.liquid index 3c4b8b8e..0dae83ea 100644 --- a/themes/aura/sections/related-products.liquid +++ b/themes/aura/sections/related-products.liquid @@ -31,7 +31,7 @@ (function() { const isMobile = window.matchMedia("(max-width: 768px)"); const products = {{ product.related_products.size }}; - const desktopBlocksPerPage = Math.max(products, 3); + const desktopBlocksPerPage = Math.min(products, 3); const desktopSlider = new Splide(`#yc_slider_{{ id }}.yc-slider__desktop`, { type: products < 4 ? 'slide' : '{{ section.settings.slider_transition_type }}', diff --git a/themes/harmony/sections/related-products.liquid b/themes/harmony/sections/related-products.liquid index aa5fd360..e0d1ec07 100644 --- a/themes/harmony/sections/related-products.liquid +++ b/themes/harmony/sections/related-products.liquid @@ -31,7 +31,7 @@ (function() { const isMobile = window.matchMedia("(max-width: 768px)"); const products = {{ product.related_products.size }}; - const desktopBlocksPerPage = Math.max(products, 3); + const desktopBlocksPerPage = Math.min(products, 3); const desktopSlider = new Splide(`#yc_slider_{{ id }}.yc-slider__desktop`, { type: products < 4 ? 'slide' : '{{ section.settings.slider_transition_type }}', diff --git a/themes/meraki/sections/related-products.liquid b/themes/meraki/sections/related-products.liquid index 3d0e5f39..3f298b43 100644 --- a/themes/meraki/sections/related-products.liquid +++ b/themes/meraki/sections/related-products.liquid @@ -31,7 +31,7 @@ (function() { const isMobile = window.matchMedia("(max-width: 768px)"); const products = {{ product.related_products.size }}; - const desktopBlocksPerPage = Math.max(products, 3); + const desktopBlocksPerPage = Math.min(products, 3); const desktopSlider = new Splide(`#yc_slider_{{ id }}.yc-slider__desktop`, { type: products < 4 ? 'slide' : '{{ section.settings.slider_transition_type }}',