Merge "MobileArticleTarget teardown behavior is upstreamed to MobileFrontend"

This commit is contained in:
jenkins-bot 2023-07-07 23:49:57 +00:00 committed by Gerrit Code Review
commit 329faab1e9

View file

@ -435,23 +435,6 @@ ve.init.mw.MobileArticleTarget.prototype.tryTeardown = function () {
this.overlay.onExitClick( $.Event() );
};
/**
* @inheritdoc
*/
ve.init.mw.MobileArticleTarget.prototype.teardown = function () {
var target = this;
// Parent method
return ve.init.mw.MobileArticleTarget.super.prototype.teardown.call( this ).then( function () {
if ( !target.isViewPage ) {
var newUrl = new URL( target.viewUrl );
if ( mw.config.get( 'wgIsRedirect' ) ) {
newUrl.searchParams.set( 'redirect', 'no' );
}
location.href = newUrl;
}
} );
};
/**
* @inheritdoc
*/