mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 03:08:42 +00:00
Merge "ArticleTarget#getWikitextFragment: Optimise no-op"
This commit is contained in:
commit
c537a8f0a2
|
@ -2334,6 +2334,11 @@ ve.init.mw.ArticleTarget.prototype.getWikitextFragment = function ( doc, useRevi
|
|||
page: this.pageName
|
||||
};
|
||||
|
||||
// Optimise as a no-op
|
||||
if ( params.html === '' ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( useRevision === undefined || useRevision ) {
|
||||
params.oldid = this.revid;
|
||||
params.etag = this.etag;
|
||||
|
|
Loading…
Reference in a new issue