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 menu not updating in view if menu item is changed and visitor is navigating between Taxons.

Matthew Kennedyd9bd8a78d7b3
diff --git a/frontend/app/controllers/spree/taxons_controller.rb b/frontend/app/controllers/spree/taxons_controller.rb
index 37251482fc..f43855b793 100644
--- a/frontend/app/controllers/spree/taxons_controller.rb
+++ b/frontend/app/controllers/spree/taxons_controller.rb
@@ -63,7 +63,10 @@ module Spree
end
def last_modified
- @taxon.updated_at&.utc
+ taxon_last_modified = @taxon&.updated_at.utc
+ current_store_last_modified = current_store.updated_at.utc
+
+ [taxon_last_modified, current_store_last_modified].compact.max
end
end
end