diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-06 03:18:34 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-06 03:18:34 +0300 |
commit | 7baebd322008e0ca912c447792f1d7cffd74f8e2 (patch) | |
tree | fa7b186891445767568ebe92f6d74846715c25ce | |
parent | 51b8b8711b51ac48fe5aea9f6282e9b75b83e65b (diff) |
Do not create input if fieldName is not defined
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee index 6b55917ec89..362ddda3596 100644 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ b/app/assets/javascripts/gl_dropdown.js.coffee @@ -369,7 +369,7 @@ class GitLabDropdown if @options.toggleLabel $(@el).find(".dropdown-toggle-text").text @options.toggleLabel(selectedObject) if value? - if !field.length + if !field.length and fieldName # Create hidden input for form input = "<input type='hidden' name='#{fieldName}' value='#{value}' />" if @options.inputId? |