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 call & email us text staying in footer, even if fields are blank. (#10396)

Matthew Kennedyefa5127d00dc
diff --git a/frontend/app/views/spree/shared/_footer.html.erb b/frontend/app/views/spree/shared/_footer.html.erb
index 8a7141aaa4..a9fbc7c39e 100644
--- a/frontend/app/views/spree/shared/_footer.html.erb
+++ b/frontend/app/views/spree/shared/_footer.html.erb
@@ -37,10 +37,10 @@
<%= current_store.address.html_safe %>
<% end %>
</div>
- <% if current_store.contact_phone %>
+ <% if current_store.contact_phone&.present? %>
<div><%= Spree.t(:call_us_now) %><%= current_store.contact_phone %></div>
<% end %>
- <% if current_store.contact_email %>
+ <% if current_store.contact_email&.present? %>
<div><%= Spree.t(:email) %>: <%= current_store.contact_email %></div>
<% end %>
</div>