summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/custom_fields/index.html.erb2
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) %>