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.

Update backend/app/controllers/spree/admin/menu_items_controller.rb

Matthew Kennedya9b049a46394
diff --git a/backend/app/controllers/spree/admin/menu_items_controller.rb b/backend/app/controllers/spree/admin/menu_items_controller.rb
index 79ce5c7c1c..7c3a550221 100644
--- a/backend/app/controllers/spree/admin/menu_items_controller.rb
+++ b/backend/app/controllers/spree/admin/menu_items_controller.rb
@@ -14,7 +14,7 @@ module Spree
end
def remove_icon
- if @menu_item.icon.destroy
+ if @menu_item.icon&.destroy
flash[:success] = Spree.t('notice_messages.icon_removed')
redirect_to spree.edit_admin_menu_menu_item_path(@menu, @menu_item)
else