Remove unnecessary object instance
Change-Id: I078a3a107d154bbcba7e1d49cbd6470b026ff869
This commit is contained in:
@@ -77,8 +77,7 @@
|
|||||||
*/
|
*/
|
||||||
addToRegion: function ( langCode, region ) {
|
addToRegion: function ( langCode, region ) {
|
||||||
var i, regionCode, $li, $column, lastLanguage, lastScriptGroup, currentScriptGroup,
|
var i, regionCode, $li, $column, lastLanguage, lastScriptGroup, currentScriptGroup,
|
||||||
lcd = this,
|
language = this.options.languages[langCode],
|
||||||
language = lcd.options.languages[langCode],
|
|
||||||
langName = $.uls.data.getAutonym( langCode ) || language || langCode,
|
langName = $.uls.data.getAutonym( langCode ) || language || langCode,
|
||||||
regions = [];
|
regions = [];
|
||||||
|
|
||||||
@@ -107,7 +106,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Append the element to the column in the list
|
// Append the element to the column in the list
|
||||||
$column = lcd.getColumn( regionCode );
|
$column = this.getColumn( regionCode );
|
||||||
lastLanguage = $column.find( 'li:last' ).data( 'code' );
|
lastLanguage = $column.find( 'li:last' ).data( 'code' );
|
||||||
|
|
||||||
if ( lastLanguage ) {
|
if ( lastLanguage ) {
|
||||||
@@ -117,7 +116,7 @@
|
|||||||
if ( lastScriptGroup !== currentScriptGroup ) {
|
if ( lastScriptGroup !== currentScriptGroup ) {
|
||||||
if ( $column.find( 'li' ).length > 2 ) {
|
if ( $column.find( 'li' ).length > 2 ) {
|
||||||
// If column already has 2 or more languages, add a new column
|
// If column already has 2 or more languages, add a new column
|
||||||
$column = lcd.getColumn( regionCode, true );
|
$column = this.getColumn( regionCode, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user