]> source.dussan.org Git - redmine.git/commitdiff
Fix that "New custom field" button does not work if there are no custom fields (...
authorGo MAEDA <maeda@farend.jp>
Sat, 17 Aug 2019 02:01:19 +0000 (02:01 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 17 Aug 2019 02:01:19 +0000 (02:01 +0000)
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

index 3f1154dc7d0d6f1edc309eb5c94a8da95bc3f478..0eecc6014302a1b94321d3cccd5dcec82b540c22 100644 (file)
@@ -1,5 +1,5 @@
 <div class="contextual">
-<%= 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' %>
 </div>
 
 <%= title l(:label_custom_field_plural) %>