]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1118930: validateEnterBug() doesn't work when attachments are disabled
authorAlbert Ting <altlist@gmail.com>
Thu, 26 Feb 2015 14:34:50 +0000 (15:34 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 26 Feb 2015 14:34:50 +0000 (15:34 +0100)
r=LpSolit a=glob

js/field.js

index 5589bc498ee3095ffd33b183f8cf4368974e34d8..2193c40eb2e70f77323ef926085614dd446d0df4 100644 (file)
@@ -42,7 +42,7 @@ function validateEnterBug(theform) {
 
     // These are checked in the reverse order that they appear on the page,
     // so that the one closest to the top of the form will be focused.
-    if (attach_data.value && YAHOO.lang.trim(attach_desc.value) == '') {
+    if (attach_data && attach_data.value && YAHOO.lang.trim(attach_desc.value) == '') {
         _errorFor(attach_desc, 'attach_desc');
         focus_me = attach_desc;
     }