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 /js | |
parent | 961fb4f72ecf393bcac58d69da1ac1509413179e (diff) | |
download | bugs-3318edcfd73461053eaeb7bbf91d1af627514322.tar bugs-3318edcfd73461053eaeb7bbf91d1af627514322.tar.gz bugs-3318edcfd73461053eaeb7bbf91d1af627514322.tar.bz2 bugs-3318edcfd73461053eaeb7bbf91d1af627514322.tar.xz bugs-3318edcfd73461053eaeb7bbf91d1af627514322.zip |
Bug 1036242: "TypeError: bug_status is undefined" when creating a bug
r=glob,a=glob
Diffstat (limited to 'js')
-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); |