From 06d09747b6a719a05a2869b129be240334846ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Thu, 21 Mar 2024 22:25:30 +0800 Subject: [PATCH] Fix bug. --- app/views/admin/seminars/_attribute_submission_field.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/seminars/_attribute_submission_field.html.erb b/app/views/admin/seminars/_attribute_submission_field.html.erb index d819c14..dd93252 100644 --- a/app/views/admin/seminars/_attribute_submission_field.html.erb +++ b/app/views/admin/seminars/_attribute_submission_field.html.erb @@ -160,7 +160,7 @@ <% @site_in_use_locales.each do |locale| %> <% active = (locale == @site_in_use_locales.first ? "active in" : "'") %> <%= content_tag :div, {class: "tab-pane fade #{active}", id: "#{name_to_id(typeG_field_name)}_#{locale}"} do %> - <% locale_value = attribute_submission_field["typeG"]["instructions"][locale.to_s] %> + <% locale_value = (attribute_submission_field["typeG"].present? ? attribute_submission_field["typeG"]["instructions"][locale.to_s] : "") %> <%= text_area(typeG_field_name, locale, value: locale_value, placeholder: "#{t(locale).to_s}", data: {:type=>"lang_#{locale}"}, class: 'ckeditor') %> <% end %> <% end %>