Merge "Convert empty doc to empty string in convertToSource"

This commit is contained in:
jenkins-bot 2017-11-06 16:36:36 +00:00 committed by Gerrit Code Review
commit a6e0c8854f

View file

@ -131,7 +131,7 @@ ve.dm.MWWikitextSurfaceFragment.prototype.convertToSource = function ( doc ) {
var wikitextPromise;
if ( !doc.data.hasContent() ) {
return $.Deferred().reject().promise();
return $.Deferred().resolve( '' ).promise();
}
wikitextPromise = ve.init.target.getWikitextFragment( doc, false );