From 6a871fdcfcda72387f59f91c0fc546da90d16c75 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 17 Aug 2019 02:01:19 +0000 Subject: [PATCH] Fix that "New custom field" button does not work if there are no custom fields (#31896, #31320). Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@18372 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/custom_fields/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/custom_fields/index.html.erb b/app/views/custom_fields/index.html.erb index 3f1154dc7..0eecc6014 100644 --- a/app/views/custom_fields/index.html.erb +++ b/app/views/custom_fields/index.html.erb @@ -1,5 +1,5 @@
-<%= link_to_function l(:label_custom_field_new), "location.href = '#{new_custom_field_path}?tab=' + encodeURIComponent($('.tabs a.selected').attr('id').split('tab-').pop())", :class => 'icon icon-add' %> +<%= link_to_function l(:label_custom_field_new), "location.href = '#{new_custom_field_path}?tab=' + encodeURIComponent(($('.tabs a.selected').attr('id')||'').split('tab-').pop())", :class => 'icon icon-add' %>
<%= title l(:label_custom_field_plural) %> -- 2.39.5