jenkins-bot has submitted this change and it was merged.
Change subject: Correct the loop logic for language buttons
......................................................................
Correct the loop logic for language buttons
It is possible that the count reach more than SUGGESTED_LANGUAGES_NUMBER
before it reach the
languagesForButtons.length === SUGGESTED_LANGUAGES_NUMBER
check. This will cause the loop to run for all languages.
Change-Id: Ie6190d1c80c2a7152af490db2bc115ecdfde4184
---
M resources/js/ext.uls.displaysettings.js
M resources/js/ext.uls.inputsettings.js
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/js/ext.uls.displaysettings.js
b/resources/js/ext.uls.displaysettings.js
index e531325..b45146b 100644
--- a/resources/js/ext.uls.displaysettings.js
+++ b/resources/js/ext.uls.displaysettings.js
@@ -188,7 +188,7 @@
languagesForButtons.push(
suggestedLanguages[lang] );
// No need to add more languages than buttons
- if ( languagesForButtons.length ===
SUGGESTED_LANGUAGES_NUMBER ) {
+ if ( languagesForButtons.length >=
SUGGESTED_LANGUAGES_NUMBER ) {
break;
}
}
diff --git a/resources/js/ext.uls.inputsettings.js
b/resources/js/ext.uls.inputsettings.js
index d5fcdd9..d21ad45 100644
--- a/resources/js/ext.uls.inputsettings.js
+++ b/resources/js/ext.uls.inputsettings.js
@@ -252,7 +252,7 @@
languagesForButtons.push(
suggestedLanguages[lang] );
// No need to add more languages than buttons
- if ( languagesForButtons.length ===
SUGGESTED_LANGUAGES_NUMBER ) {
+ if ( languagesForButtons.length >=
SUGGESTED_LANGUAGES_NUMBER ) {
break;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/67234
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6190d1c80c2a7152af490db2bc115ecdfde4184
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits