MobileArticleTarget teardown behavior is upstreamed to MobileFrontend

Bug: T334263
Depends-On: If1ad6e88cf595ef3d3e54d41c00f0b79704be043
Change-Id: Idb95bfd2b71f5967396a1f36636b0a155dec2fb2
This commit is contained in:
David Lynch 2023-06-29 09:54:03 -05:00
parent b986645d0a
commit 14b32181ea

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
*/