Merge "ArticleTarget#getWikitextFragment: Optimise no-op"

This commit is contained in:
jenkins-bot 2017-03-02 05:45:58 +00:00 committed by Gerrit Code Review
commit c537a8f0a2

View file

@ -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;