Properly clear this.section when switching from VE

Bug: T153276
Change-Id: Idc251c73c03bf87b6e6ca716be98b38d4fb68c5e
This commit is contained in:
Ed Sanders 2016-12-15 01:34:30 +00:00
parent c92418e4da
commit 17a164363b

View file

@ -1631,12 +1631,15 @@ ve.init.mw.DesktopArticleTarget.prototype.switchToWikitextEditor = function ( di
var uri, oldid, prefPromise, dataPromise,
target = this;
// We may have this.section but VE is always full page at the moment
this.section = null;
if ( ve.init.target.isModeAvailable( 'source' ) && !leaveVE ) {
if ( discardChanges ) {
dataPromise = mw.libs.ve.targetLoader.requestPageData(
'source',
this.pageName,
null, // We may have this.section but VE is always full page at the moment
this.section,
this.requestedRevId,
this.constructor.name
).then(