From 7baebd322008e0ca912c447792f1d7cffd74f8e2 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran <alfredo@gitlab.com> Date: Tue, 5 Apr 2016 19:18:34 -0500 Subject: [PATCH] Do not create input if fieldName is not defined --- app/assets/javascripts/gl_dropdown.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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? -- 2.30.9