Merge pull request #1920 from mozilla/1919-tier-1-language-fxa-filter-issue
Fixed #1919 - Revised logic to use some() method
This commit is contained in:
Коммит
6a1d346bea
|
@ -314,14 +314,7 @@ function resizeDashboardMargin() {
|
|||
|
||||
function checkIfTier1(preferredLanguage) {
|
||||
const tier1Languages = ["de", "en", "fr"];
|
||||
|
||||
tier1Languages.forEach( lang => {
|
||||
if (preferredLanguage.includes(lang) ) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
return tier1Languages.some(lang => preferredLanguage.includes(lang));
|
||||
}
|
||||
|
||||
( async() => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче