ve.init.mw.ArticleTarget: Skip prompt when switching to VE from NWE section editing if unchanged

Bug: T136267
Change-Id: I30eae20baca2e16fa5f710485eab213edd5c4a08
This commit is contained in:
Bartosz Dziewoński 2018-08-01 04:07:44 +02:00 committed by Jforrester
parent 33b59909df
commit a387778ac3

View file

@ -2466,6 +2466,12 @@ ve.init.mw.ArticleTarget.prototype.switchToVisualEditor = function () {
var dataPromise, windowManager, switchWindow,
target = this;
if ( !this.edited ) {
this.section = null;
this.reloadSurface( 'visual' );
return;
}
// Show a discard-only confirm dialog, and then reload the whole page, if:
if (
// * section editing in WT, as WT -> VE is not yet supported, or