diff --git a/toolkit/components/satchel/nsFormAutoComplete.js b/toolkit/components/satchel/nsFormAutoComplete.js index be2142c33d1..4cfe0a2af8b 100644 --- a/toolkit/components/satchel/nsFormAutoComplete.js +++ b/toolkit/components/satchel/nsFormAutoComplete.js @@ -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)