Fix a bad variable in global typehaead order/limit code
Summary: Ref T12538. I missed this in D17695, which renamed the variable. The logic was also a little off since `jj` is an index, not a count. Test Plan: Typed `con` in global search, which hits "Con-pherence", "Con-duit" and "Con-fig", plus a bunch of other stuff. Got results after patch. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12538 Differential Revision: https://secure.phabricator.com/D17700
This commit is contained in:
@@ -94,7 +94,6 @@ JX.behavior('phabricator-search-typeahead', function(config) {
|
||||
// If we have more results than fit, limit each type of result to 3, so
|
||||
// we show 3 applications, then 3 users, etc. For jump items, we show only
|
||||
// one result.
|
||||
|
||||
var jj;
|
||||
var results = [];
|
||||
for (ii = 0; ii < type_order.length; ii++) {
|
||||
@@ -108,8 +107,8 @@ JX.behavior('phabricator-search-typeahead', function(config) {
|
||||
// - we have more items than will fit in the typeahead, and this
|
||||
// is the 4..Nth result of its type.
|
||||
|
||||
var skip = ((current_type == 'jump') && (jj > 1)) ||
|
||||
((list.length > config.limit) && (type_count > 3));
|
||||
var skip = ((current_type == 'jump') && (jj >= 1)) ||
|
||||
((list.length > config.limit) && (jj >= 3));
|
||||
if (skip) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user