mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Don't reject activatingDeferred on loadFail
loadFail can result in a retry, in which case it isn't approraite to reject this promise. Also many of the code paths call 'tryTeardown' which itself will reject the promise. Bug: T238332 Change-Id: I366662847304d8ecf79d5899b2804dded67ee999
This commit is contained in:
parent
ca003af9fb
commit
687882f596
|
@ -671,8 +671,6 @@ ve.init.mw.DesktopArticleTarget.prototype.loadFail = function ( code, errorDetai
|
||||||
var errorInfo, confirmPromptMessage,
|
var errorInfo, confirmPromptMessage,
|
||||||
target = this;
|
target = this;
|
||||||
|
|
||||||
this.activatingDeferred.reject();
|
|
||||||
|
|
||||||
// Parent method
|
// Parent method
|
||||||
ve.init.mw.DesktopArticleTarget.super.prototype.loadFail.apply( this, arguments );
|
ve.init.mw.DesktopArticleTarget.super.prototype.loadFail.apply( this, arguments );
|
||||||
|
|
||||||
|
@ -727,6 +725,7 @@ ve.init.mw.DesktopArticleTarget.prototype.loadFail = function ( code, errorDetai
|
||||||
// don't try to switch back to it fully, that'd discard changes.
|
// don't try to switch back to it fully, that'd discard changes.
|
||||||
target.tryTeardown( true );
|
target.tryTeardown( true );
|
||||||
} else {
|
} else {
|
||||||
|
target.activatingDeferred.reject();
|
||||||
// TODO: Some sort of progress bar?
|
// TODO: Some sort of progress bar?
|
||||||
target.wikitextFallbackLoading = true;
|
target.wikitextFallbackLoading = true;
|
||||||
target.switchToWikitextEditor( false );
|
target.switchToWikitextEditor( false );
|
||||||
|
|
Loading…
Reference in a new issue