diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-23 04:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-23 04:29:10 +0000 |
commit | e3cb9707d5a825c871111670200af02af1718195 (patch) | |
tree | e9b374d6a4dc9990a45e9b61098624f0b722ede1 /browser/components/urlbar/private | |
parent | Adding debian version 125.0.1-2. (diff) | |
download | firefox-e3cb9707d5a825c871111670200af02af1718195.tar.xz firefox-e3cb9707d5a825c871111670200af02af1718195.zip |
Merging upstream version 125.0.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/urlbar/private')
-rw-r--r-- | browser/components/urlbar/private/YelpSuggestions.sys.mjs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/browser/components/urlbar/private/YelpSuggestions.sys.mjs b/browser/components/urlbar/private/YelpSuggestions.sys.mjs index a1ac13177b..4cf454c71d 100644 --- a/browser/components/urlbar/private/YelpSuggestions.sys.mjs +++ b/browser/components/urlbar/private/YelpSuggestions.sys.mjs @@ -227,19 +227,11 @@ export class YelpSuggestions extends BaseFeature { } get #minKeywordLength() { - // It's unusual to get both a Nimbus variable and its fallback pref at the - // same time, but we have a good reason. To recap, if a variable doesn't - // have a value, then the value of its fallback will be returned; otherwise - // the variable value will be returned. That's usually what we want, but for - // Yelp, we set the pref each time the user clicks "show less frequently", - // and we want the variable to act only as an initial min length. In other - // words, if the pref has a user value (because we set it), use it; - // otherwise use the initial value defined by the variable. - return Math.max( - lazy.UrlbarPrefs.get("yelpMinKeywordLength") || 0, - lazy.UrlbarPrefs.get("yelp.minKeywordLength") || 0, - 0 - ); + let minLength = + lazy.UrlbarPrefs.get("yelp.minKeywordLength") || + lazy.UrlbarPrefs.get("yelpMinKeywordLength") || + 0; + return Math.max(minLength, 0); } async #fetchCity() { |