mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Target#tryTeardown should succeed when target isn't active
It makes other code easier to write when we want to make sure that no target is active. Change-Id: Ica75f8334ef32ffbcc59109a46624acdf271847d
This commit is contained in:
parent
8eb272c2be
commit
5736f8ead6
|
@ -551,7 +551,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 this.teardownPromise || ve.createDeferred().reject().promise();
|
||||
return this.teardownPromise || ve.createDeferred().resolve().promise();
|
||||
}
|
||||
|
||||
// Just in case these weren't closed before
|
||||
|
|
Loading…
Reference in a new issue