summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-06-15 10:35:22 +0200
committerByron Jones <bjones@mozilla.com>2012-06-15 10:35:22 +0200
commitcc8094d001ab16e015cd75e29e6d335cf29b1a5b (patch)
treec51cfa53592e6fc373db91d9eeaee7cead5d4393
parent5a403a3cfe5b02a34d7608cd301742420c8a6605 (diff)
downloadbugzilla-cc8094d001ab16e015cd75e29e6d335cf29b1a5b.tar.gz
bugzilla-cc8094d001ab16e015cd75e29e6d335cf29b1a5b.tar.xz
Fix instant search crashing when a product is not pre-selected
-rw-r--r--template/en/default/search/search-instant.html.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/template/en/default/search/search-instant.html.tmpl b/template/en/default/search/search-instant.html.tmpl
index 59cd8c551..c14b681b1 100644
--- a/template/en/default/search/search-instant.html.tmpl
+++ b/template/en/default/search/search-instant.html.tmpl
@@ -46,7 +46,7 @@ YAHOO.bugzilla.instantSearch.setLabels( {
[% FOREACH p = user.get_selectable_products(c.id) %]
[% IF p.components.size %]
<option value="[% p.name FILTER html %]"
- [% " selected" IF lsearch(default.product, p.name) != -1 %]>
+ [% " selected" IF default.product && lsearch(default.product, p.name) != -1 %]>
[% p.name FILTER html %]
</option>
[% END %]
@@ -56,7 +56,7 @@ YAHOO.bugzilla.instantSearch.setLabels( {
[% ELSE %]
[% FOREACH p = product %]
<option value="[% p.name FILTER html %]"
- [% " selected" IF lsearch(default.product, p.name) != -1 %]>
+ [% " selected" IF default.product && lsearch(default.product, p.name) != -1 %]>
[% p.name FILTER html %]
</option>
[% END %]