mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
Merge "Convert empty doc to empty string in convertToSource"
This commit is contained in:
commit
a6e0c8854f
|
@ -131,7 +131,7 @@ ve.dm.MWWikitextSurfaceFragment.prototype.convertToSource = function ( doc ) {
|
||||||
var wikitextPromise;
|
var wikitextPromise;
|
||||||
|
|
||||||
if ( !doc.data.hasContent() ) {
|
if ( !doc.data.hasContent() ) {
|
||||||
return $.Deferred().reject().promise();
|
return $.Deferred().resolve( '' ).promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
wikitextPromise = ve.init.target.getWikitextFragment( doc, false );
|
wikitextPromise = ve.init.target.getWikitextFragment( doc, false );
|
||||||
|
|
Loading…
Reference in a new issue