Skip to content

Commit

Permalink
Validate whether the language from API is known while trying to display
Browse files Browse the repository at this point in the history
See https://bugzilla.wikimedia.org/show_bug.cgi?id=54725

Change-Id: Ie77f7cd02d37338a6b65db653c2ba3b35906dac0
  • Loading branch information
santhoshtr committed Nov 15, 2013
1 parent e43994d commit 623cdb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jquery.uls.lcd.js
Expand Up @@ -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.

This comment has been minimized.

Copy link
@Nikerabbit

Nikerabbit Nov 15, 2013

Member

Typo: langauges -> languages

return;
}
this.addToRegion( langCode, regionCode );
this.$noResults.hide();
},
Expand Down

0 comments on commit 623cdb6

Please sign in to comment.