mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 02:54:23 +00:00
popup is undefined
This will throw a client side error. Let's not do that. What's needed here is a toast. Change-Id: I6395fec5cf3fc6ac561aa13d3d9d031e153f3341
This commit is contained in:
parent
dc0efd360a
commit
c90883c591
|
@ -15,19 +15,16 @@
|
|||
} ).then( function () {
|
||||
mw.notify( mw.msg( 'thanks-thanked-notice', name, recipientGender, mw.user ) );
|
||||
}, function ( errorCode ) {
|
||||
// FIXME: What is "popup" and where is it defined?
|
||||
/* eslint-disable no-undef */
|
||||
switch ( errorCode ) {
|
||||
case 'invalidrevision':
|
||||
popup.show( mw.msg( 'thanks-error-invalidrevision' ) );
|
||||
mw.notify( mw.msg( 'thanks-error-invalidrevision' ) );
|
||||
break;
|
||||
case 'ratelimited':
|
||||
popup.show( mw.msg( 'thanks-error-ratelimited', recipientGender ) );
|
||||
mw.notify( mw.msg( 'thanks-error-ratelimited', recipientGender ) );
|
||||
break;
|
||||
default:
|
||||
popup.show( mw.msg( 'thanks-error-undefined', errorCode ) );
|
||||
mw.notify( mw.msg( 'thanks-error-undefined', errorCode ) );
|
||||
}
|
||||
/* eslint-enable no-undef */
|
||||
} );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue