From 3c393b2247b82a0a445f2a1451ecb8dd4cf799b2 Mon Sep 17 00:00:00 2001 From: Bohung Date: Wed, 26 May 2021 10:21:51 +0800 Subject: [PATCH] Fix bug. --- app/controllers/site_menu_widgets_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/site_menu_widgets_controller.rb b/app/controllers/site_menu_widgets_controller.rb index d856b41..ff96237 100644 --- a/app/controllers/site_menu_widgets_controller.rb +++ b/app/controllers/site_menu_widgets_controller.rb @@ -2,6 +2,7 @@ class SiteMenuWidgetsController < ApplicationController def create_json(pages) items = [] pages.each do |page| + next if (!page.menu_enabled_for.include?(I18n.locale.to_s) rescue false item = {} item["obj"] = page if page.child_page.size > 0