Merge "Follow-up I64a8ed73: Fix NWE getWikitextFragment"

This commit is contained in:
jenkins-bot 2016-10-26 23:57:44 +00:00 committed by Gerrit Code Review
commit 3c443724e2

View file

@ -277,7 +277,8 @@ ve.init.mw.DesktopWikitextArticleTarget.prototype.restoreEditSection = function
ve.init.mw.DesktopWikitextArticleTarget.prototype.getWikitextFragment = function ( doc, useRevision ) {
var promise, xhr,
params = {
action: 'visualeditor',
action: 'visualeditoredit',
token: this.editToken,
paction: 'serialize',
html: ve.dm.converter.getDomFromModel( doc ).body.innerHTML,
page: this.pageName
@ -294,10 +295,10 @@ ve.init.mw.DesktopWikitextArticleTarget.prototype.getWikitextFragment = function
);
promise = xhr.then( function ( response ) {
if ( response.visualeditor ) {
return response.visualeditor.content;
if ( response.visualeditoredit ) {
return response.visualeditoredit.content;
}
return $.Deferred.reject();
return $.Deferred().reject();
} );
promise.abort = function () {