From: Albert Ting Date: Thu, 26 Feb 2015 14:32:51 +0000 (+0100) Subject: Bug 1118930: validateEnterBug() doesn't work when attachments are disabled X-Git-Tag: release-5.1.1~349 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6419b7fcbf9c8efa2d7b55c7e40cfbdf08a5cd5c;p=thirdparty%2Fbugzilla.git Bug 1118930: validateEnterBug() doesn't work when attachments are disabled r=LpSolit a=glob --- diff --git a/js/field.js b/js/field.js index c0a2218a8b..167ab492ff 100644 --- a/js/field.js +++ b/js/field.js @@ -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; }