mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Fix incomplete return in DesktopArticleTarget.tryTeardown()
If a teardown has started, there should be a teardownPromise, otherwise return a rejected promise. Bug: T268358 Change-Id: Ia5cbd6b409a38f97243234ea7c87d24f71bdf3d6
This commit is contained in:
parent
3e6d5c6817
commit
fb0e33f987
|
@ -559,7 +559,7 @@ ve.init.mw.DesktopArticleTarget.prototype.teardownNewSection = function ( surfac
|
|||
*/
|
||||
ve.init.mw.DesktopArticleTarget.prototype.tryTeardown = function ( noPrompt, trackMechanism ) {
|
||||
if ( this.deactivating || ( !this.active && !this.activating ) ) {
|
||||
return;
|
||||
return this.teardownPromise || ve.createDeferred().reject().promise();
|
||||
}
|
||||
|
||||
// Just in case these weren't closed before
|
||||
|
|
Loading…
Reference in a new issue