Bug 1558859 - Sync availableLanguageSelected() with M-C version. r=me DONTBUILD
authorJorg K <jorgk@jorgk.com>
Wed, 12 Jun 2019 18:58:47 +0200
changeset 35841 5fb059126bfaa39464ac0db87db20e608b40fbc6
parent 35840 f6f0c189c55a7e2d1acf453c220da679b2e17dae
child 35842 11a90453a1d311cd8f24d21231591ae5760d392a
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersme
bugs1558859
Bug 1558859 - Sync availableLanguageSelected() with M-C version. r=me DONTBUILD
mail/components/preferences/messengerLanguages.js
--- a/mail/components/preferences/messengerLanguages.js
+++ b/mail/components/preferences/messengerLanguages.js
@@ -423,17 +423,17 @@ var gMessengerLanguagesDialog = {
         label: await document.l10n.formatValue("messenger-languages-search"),
         value: "search",
       });
     }
     this._availableLocales.setItems(items);
   },
 
   async availableLanguageSelected(item) {
-    if ((await getAvailableLocales()).has(item.value)) {
+    if ((await getAvailableLocales()).includes(item.value)) {
       await this.requestLocalLanguage(item);
     } else if (this.availableLangpacks.has(item.value)) {
       await this.requestRemoteLanguage(item);
     } else {
       this.showError();
     }
   },