]> 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:32:51 +0000 (15:32 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 26 Feb 2015 14:32:51 +0000 (15:32 +0100)
r=LpSolit a=glob

js/field.js

index c0a2218a8bf5f9a6438fc3e2a5a147c2181243c3..167ab492ffe225a750a04c0b04f6fb2bb045af73 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;
     }