Validate whether the language from API is known while trying to display
See https://bugzilla.wikimedia.org/show_bug.cgi?id=54725 Change-Id: Ie77f7cd02d37338a6b65db653c2ba3b35906dac0
This commit is contained in:
@@ -64,6 +64,10 @@
|
|||||||
constructor: LanguageCategoryDisplay,
|
constructor: LanguageCategoryDisplay,
|
||||||
|
|
||||||
append: function ( langCode, regionCode ) {
|
append: function ( langCode, regionCode ) {
|
||||||
|
if ( !this.options.languages[langCode] ) {
|
||||||
|
// Language is unknown or not in the list of langauges for this context.
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.addToRegion( langCode, regionCode );
|
this.addToRegion( langCode, regionCode );
|
||||||
this.$noResults.hide();
|
this.$noResults.hide();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user