summaryrefslogtreecommitdiffstats
path: root/browser/components/urlbar/private
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-23 04:30:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-23 04:30:02 +0000
commit54d9c30a346d86e71c7564b84bff710fb8c49807 (patch)
tree59afeb0047d195a60511b7a91198de779d49dbdf /browser/components/urlbar/private
parentReleasing progress-linux version 125.0.1-2~progress7.99u1. (diff)
downloadfirefox-54d9c30a346d86e71c7564b84bff710fb8c49807.tar.xz
firefox-54d9c30a346d86e71c7564b84bff710fb8c49807.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.mjs18
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() {