summaryrefslogtreecommitdiffstats
path: root/extensions/GuidedBugEntry
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-01-17 13:08:16 +0100
committerByron Jones <bjones@mozilla.com>2012-01-17 13:08:16 +0100
commit090f76d8d8019c86e33d440e71a9b01482a882cb (patch)
tree273208794e8727ba97886eaad15756e93f246e5e /extensions/GuidedBugEntry
parent772b60bab53937d386c030f21ad23d38edee7570 (diff)
downloadbugzilla-090f76d8d8019c86e33d440e71a9b01482a882cb.tar.gz
bugzilla-090f76d8d8019c86e33d440e71a9b01482a882cb.tar.xz
Bug 718593: Fix broken guided bug entry
Diffstat (limited to 'extensions/GuidedBugEntry')
-rw-r--r--extensions/GuidedBugEntry/web/js/guided.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/GuidedBugEntry/web/js/guided.js b/extensions/GuidedBugEntry/web/js/guided.js
index 76d3ae799..a8328da17 100644
--- a/extensions/GuidedBugEntry/web/js/guided.js
+++ b/extensions/GuidedBugEntry/web/js/guided.js
@@ -169,7 +169,7 @@ var product = {
}
// show/hide component selection row
- if (products[productName].noComponentSelection) {
+ if (products[productName] && products[productName].noComponentSelection) {
if (!Dom.hasClass('componentTR', 'hidden')) {
Dom.addClass('componentTR', 'hidden');
bugForm.toggleOddEven();
@@ -616,7 +616,7 @@ var bugForm = {
// build components
var elComponent = Dom.get('component');
- if (products[productName].noComponentSelection) {
+ if (products[productName] && products[productName].noComponentSelection) {
elComponent.value = products[productName].defaultComponent;
bugForm._mandatoryFields = [ 'short_desc', 'version_select' ];
@@ -626,7 +626,7 @@ var bugForm = {
bugForm._mandatoryFields = [ 'short_desc', 'component_select', 'version_select' ];
// check for the default component
- var defaultRegex = products[productName].defaultComponent
+ var defaultRegex = products[productName] && products[productName].defaultComponent
? new RegExp('^' + products[productName].defaultComponent + '$', 'i')
: new RegExp('General', 'i');
var preselectedComponent = false;