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:
Ed Sanders 2019-11-14 15:08:56 +00:00
parent ca003af9fb
commit 687882f596

View file

@ -671,8 +671,6 @@ ve.init.mw.DesktopArticleTarget.prototype.loadFail = function ( code, errorDetai
var errorInfo, confirmPromptMessage,
target = this;
this.activatingDeferred.reject();
// Parent method
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.
target.tryTeardown( true );
} else {
target.activatingDeferred.reject();
// TODO: Some sort of progress bar?
target.wikitextFallbackLoading = true;
target.switchToWikitextEditor( false );