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:
Santhosh Thottingal
2013-11-15 15:15:00 +05:30
parent e43994d77d
commit 623cdb605a

View File

@@ -64,6 +64,10 @@
constructor: LanguageCategoryDisplay,
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.$noResults.hide();
},