summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ProdCompSearch/web/js/prod_comp_search.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/extensions/ProdCompSearch/web/js/prod_comp_search.js b/extensions/ProdCompSearch/web/js/prod_comp_search.js
index efbaab81b..1b7e396a8 100644
--- a/extensions/ProdCompSearch/web/js/prod_comp_search.js
+++ b/extensions/ProdCompSearch/web/js/prod_comp_search.js
@@ -59,14 +59,17 @@ $(function() {
$('.prod_comp_search')
.each(function() {
var that = $(this);
+ var params = {
+ limit: (that.data('max_results') + 1)
+ };
+ if (BUGZILLA.api_token) {
+ params.Bugzilla_api_token = BUGZILLA.api_token;
+ }
that.devbridgeAutocomplete({
serviceUrl: function(query) {
return 'rest/prod_comp_search/' + encodeURIComponent(query);
},
- params: {
- Bugzilla_api_token: (BUGZILLA.api_token ? BUGZILLA.api_token : ''),
- limit: (that.data('max_results') + 1)
- },
+ params: params,
deferRequestBy: 250,
minChars: 3,
maxHeight: 500,