mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 700389 - Simplify sortByTotalScore. r=zpao
This commit is contained in:
parent
351eedb003
commit
75b4a80ee3
@ -163,9 +163,7 @@ FormAutoComplete.prototype = {
|
||||
*/
|
||||
autoCompleteSearch : function (aInputName, aUntrimmedSearchString, aField, aPreviousResult) {
|
||||
function sortBytotalScore (a, b) {
|
||||
let x = a.totalScore;
|
||||
let y = b.totalScore;
|
||||
return ((x > y) ? -1 : ((x < y) ? 1 : 0));
|
||||
return b.totalScore - a.totalScore;
|
||||
}
|
||||
|
||||
if (!this._enabled)
|
||||
|
Loading…
Reference in New Issue
Block a user