From c90883c59101febe36150a8070d607b50f8d0a72 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Fri, 8 Feb 2019 12:31:03 -0800 Subject: [PATCH] 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 --- modules/ext.thanks.mobilediff.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/ext.thanks.mobilediff.js b/modules/ext.thanks.mobilediff.js index 68d2be85..6d2d4109 100644 --- a/modules/ext.thanks.mobilediff.js +++ b/modules/ext.thanks.mobilediff.js @@ -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 */ } ); }