jquery.uls.lcd: Check if languages are present before highlighting
There might not be any languages if uls empty state is set in ULS extension
This commit is contained in:
1 parent
198e825eeb
commit
a5a4701792
1 file changed
+4
@@ -148,6 +148,10 @@
|
||||
*/
|
||||
highlightLanguageOption: function () {
|
||||
var $listItems = this.getLanguageOptionListItems();
|
||||
// There are no language items. Nothing to highlight.
|
||||
if ( !$listItems.length ) {
|
||||
return;
|
||||
}
|
||||
$listItems.removeClass( 'uls-language-option--highlighted' );
|
||||
|
||||
var $selectedItem = $listItems.eq( this.navigationIndex );
|
||||
|
||||
Reference in new issue
Block a user