From 4a8182710bcdeeffd17723603c7878964c33b832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Sat, 18 Dec 2021 13:22:00 +0800 Subject: [PATCH] fix error --- app/controllers/breadcrumb_widgets_controller.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/breadcrumb_widgets_controller.rb b/app/controllers/breadcrumb_widgets_controller.rb index 467105b..93595da 100644 --- a/app/controllers/breadcrumb_widgets_controller.rb +++ b/app/controllers/breadcrumb_widgets_controller.rb @@ -1,6 +1,7 @@ class BreadcrumbWidgetsController < ApplicationController def widget params = OrbitHelper.params + org_params = OrbitHelper.request.query_parameters url = params["url"] crumbs = url.split("/") data = [] @@ -33,11 +34,11 @@ class BreadcrumbWidgetsController < ApplicationController end end else - if params[:category].present? - override_page_name = Category.find(Array(params[:category]).first).title rescue nil + if org_params[:category].present? + override_page_name = Category.find(Array(org_params[:category]).first).title rescue nil end - if params[:tags].present? - override_page_name = Tag.find(Array(params['tags']).first).name rescue nil + if org_params[:tags].present? + override_page_name = Tag.find(Array(org_params['tags']).first).name rescue nil end end if override_page_name.present?