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:
@@ -98,7 +98,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ( i = 0; i < regions.length; i++ ) {
|
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
|
// Work around the bad interface, delay rendering until we have got
|
||||||
|
|||||||
Reference in New Issue
Block a user