diff options
author | Go MAEDA <maeda@farend.jp> | 2019-08-17 02:01:19 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-08-17 02:01:19 +0000 |
commit | 6a871fdcfcda72387f59f91c0fc546da90d16c75 (patch) | |
tree | 7dd81f58662ed42c67e0ce58696853cf52a089c9 /app/views/custom_fields/index.html.erb | |
parent | 76788318a77f766e740b349f59ac3759ca7c145e (diff) | |
download | redmine-6a871fdcfcda72387f59f91c0fc546da90d16c75.tar.gz redmine-6a871fdcfcda72387f59f91c0fc546da90d16c75.zip |
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
Diffstat (limited to 'app/views/custom_fields/index.html.erb')
-rw-r--r-- | app/views/custom_fields/index.html.erb | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ <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) %> |