Bug 1581885 - check for en-us language without being case sensitive. r=johannh a=lizzard
authorErica Wright <ewright@mozilla.com>
Wed, 18 Sep 2019 15:00:22 +0000
changeset 555239 b065c712f6e611b1c4c876d0b77da24d1fa2eccc
parent 555238 3e2db869dea80af6141c5169ba87b5ddc37aa44c
child 555240 221d63b48798e16476444b5e6328fc28c7ff0d55
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh, lizzard
bugs1581885
milestone70.0
Bug 1581885 - check for en-us language without being case sensitive. r=johannh a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D46197
browser/components/about/AboutProtectionsHandler.jsm
--- a/browser/components/about/AboutProtectionsHandler.jsm
+++ b/browser/components/about/AboutProtectionsHandler.jsm
@@ -292,17 +292,19 @@ var AboutProtectionsHandler = {
       "intl.accept_languages",
       Ci.nsIPrefLocalizedString
     );
     const alreadyInstalled = await AddonManager.getAddonByID(
       SECURE_PROXY_ADDON_ID
     );
 
     return (
-      region === "US" && !alreadyInstalled && languages.data.includes("en-US")
+      region.toLowerCase() === "us" &&
+      !alreadyInstalled &&
+      languages.data.toLowerCase().includes("en-us")
     );
   },
 
   /**
    * Sends a response from message target.
    *
    * @param {Object}  target
    *        The message target.