Merge "Use jQuery 3 .catch( fn ) instead of .then( null, fn )"

This commit is contained in:
jenkins-bot 2018-02-12 17:12:07 +00:00 committed by Gerrit Code Review
commit 8c0c510b33
2 changed files with 2 additions and 3 deletions

View file

@ -279,8 +279,7 @@
this.toggleListDisplay( true );
// Query all sources
this.controller.fetchCrossWikiNotifications()
.then(
null,
.catch(
function ( result ) {
var loginPageTitle = mw.Title.newFromText( 'Special:UserLogin' );
// If failure, check if the failure is due to login

View file

@ -65,7 +65,7 @@
this.pushPending();
return this.controller.fetchLocalNotifications( true )
.then( null, function ( errorObj ) {
.catch( function ( errorObj ) {
if ( errorObj.errCode === 'notlogin-required' ) {
// Login required message
widget.notificationsWidget.resetLoadingOption( mw.msg( 'echo-notification-loginrequired' ) );