Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixed: storefront products infinite scroll (#12451)

Damian Legawiec4a1aa8c37161
diff --git a/storefront/app/views/spree/shared/_load_more_products.turbo_stream.erb b/storefront/app/views/spree/shared/_load_more_products.turbo_stream.erb
index f0b9839609..6e09bb4139 100644
--- a/storefront/app/views/spree/shared/_load_more_products.turbo_stream.erb
+++ b/storefront/app/views/spree/shared/_load_more_products.turbo_stream.erb
@@ -1,5 +1,5 @@
<%= turbo_stream.replace "next_page" do %>
- <%= render 'spree/products/show_more_button' %>
+ <%= render 'spree/products/show_more_button' if storefront_products.any? %>
<% end %>
<%= turbo_stream.append "products" do %>