From 991b705399b738c0b752e2b891ed13d740276e49 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 26 May 2021 12:23:27 +0800 Subject: [PATCH] Fix bug. --- app/controllers/site_menu_widgets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/site_menu_widgets_controller.rb b/app/controllers/site_menu_widgets_controller.rb index fa86096..bcbfaec 100644 --- a/app/controllers/site_menu_widgets_controller.rb +++ b/app/controllers/site_menu_widgets_controller.rb @@ -2,7 +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 + next if (!page.menu_enabled_for.include?(I18n.locale.to_s) rescue false) item = {} item["obj"] = page if page.child_page.size > 0