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.

fix frontend product partial nil price ternary operator bug

Biruk Haileye Tabor5c4a8517f393
diff --git a/frontend/app/views/spree/products/_product.html.erb b/frontend/app/views/spree/products/_product.html.erb
index 54b1aba7dc..6f4a0ef022 100644
--- a/frontend/app/views/spree/products/_product.html.erb
+++ b/frontend/app/views/spree/products/_product.html.erb
@@ -10,7 +10,7 @@
<% end %>
</div>
<div class="card-footer text-center">
- <span class="price selling lead" content="<%= price.nil? 0 : price.to_d %>">
+ <span class="price selling lead" content="<%= price.nil? ? 0 : price.to_d %>">
<%= display_price(product) %>
</span>
<span content="<%= current_currency %>"></span>