From 090f76d8d8019c86e33d440e71a9b01482a882cb Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 17 Jan 2012 20:08:16 +0800 Subject: Bug 718593: Fix broken guided bug entry --- extensions/GuidedBugEntry/web/js/guided.js | 6 +++--- 1 file 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; -- cgit v1.2.3-24-g4f1b