ULS LCD: Check if region exists before adding languages

The regions displayed on ULS depend on the showRegions parameter
passed to uls.lcd plugin. If a new language and region have
been added to the language data, the region for it will not be
available to showRegion because it's static.

Bug: T187553
This commit is contained in:
Abijeet
2021-09-28 15:23:49 +05:30
committed by Niklas Laxström
parent e0740e5882
commit e3a9a11840

View File

@@ -98,7 +98,9 @@
}
for ( i = 0; i < regions.length; i++ ) {
this.regionLanguages[ regions[ i ] ].push( langCode );
if ( this.regionLanguages[ regions[ i ] ] ) {
this.regionLanguages[ regions[ i ] ].push( langCode );
}
}
// Work around the bad interface, delay rendering until we have got