Simplify variable assignment.
This makes the code shorter and the message is generated only in the else path. Change-Id: I1367280b6c154fe77b8a2cfbcdb6333aecefab53
This commit is contained in:
@@ -87,10 +87,8 @@
|
||||
} ).done( function () {
|
||||
location.replace( currentUrlWithoutSetLang() );
|
||||
} ).fail( function ( code, result ) {
|
||||
var apiErrorInfo = mw.msg( 'ext-uls-setlang-unknown-error' );
|
||||
if ( result.error && result.error.info ) {
|
||||
apiErrorInfo = result.error.info;
|
||||
}
|
||||
var apiErrorInfo = result.error && result.error.info ||
|
||||
mw.msg( 'ext-uls-setlang-unknown-error' );
|
||||
mw.notify(
|
||||
mw.msg( 'ext-uls-setlang-error', apiErrorInfo ),
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user