From 6e169b779dec40e00736fc142c208a83b2b2514a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Mon, 15 Nov 2021 12:39:30 +0800 Subject: [PATCH] fix error --- app/controllers/faqs_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/faqs_controller.rb b/app/controllers/faqs_controller.rb index 7a78ed0..cd48465 100644 --- a/app/controllers/faqs_controller.rb +++ b/app/controllers/faqs_controller.rb @@ -39,14 +39,14 @@ class FaqsController < ApplicationController return {} if (faq.category.disable rescue false) locale = I18n.locale.to_s - + faqs_files = faq.qa_files.collect do |f| next if !qa_file.enabled_for?(locale) { "file_url" => f.file.url + "\" title=\"#{f.file_title}", "file_title" => f.title } - end + end.compact faqs_links = faq.qa_links.collect do |f| { "link_url" => f.url,