diff options
author | Matt Tyson <mtyson@redhat.com> | 2014-09-10 22:56:06 +0800 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-09-10 22:56:06 +0800 |
commit | 3318edcfd73461053eaeb7bbf91d1af627514322 (patch) | |
tree | 67a79b412b87561d32e16f8b354f78197f683e22 | |
parent | Bug 1053513 - remove last-visited entries when a user removes involvement fro... (diff) | |
download | bugzilla-3318edcfd73461053eaeb7bbf91d1af627514322.tar.gz bugzilla-3318edcfd73461053eaeb7bbf91d1af627514322.tar.bz2 bugzilla-3318edcfd73461053eaeb7bbf91d1af627514322.zip |
Bug 1036242: "TypeError: bug_status is undefined" when creating a bug
r=glob,a=glob
-rw-r--r-- | js/field.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/js/field.js b/js/field.js index 20b08da48..1cd58a69a 100644 --- a/js/field.js +++ b/js/field.js @@ -46,10 +46,14 @@ function validateEnterBug(theform) { _errorFor(attach_desc, 'attach_desc'); focus_me = attach_desc; } - var check_description = status_comment_required[bug_status.value]; - if (check_description && YAHOO.lang.trim(description.value) == '') { - _errorFor(description, 'description'); - focus_me = description; + // bug_status can be undefined if the bug_status field is not editable by + // the currently logged in user. + if (bug_status) { + var check_description = status_comment_required[bug_status.value]; + if (check_description && YAHOO.lang.trim(description.value) == '') { + _errorFor(description, 'description'); + focus_me = description; + } } if (YAHOO.lang.trim(short_desc.value) == '') { _errorFor(short_desc); |