mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-13 17:48:17 +00:00
ArticleTarget: Fix return of getVisualDiffGeneratorPromise
The promise is supposed to return a function that can be used to lazily generate the visual diff, not the visual diff itself. This was broken when switching to arrow functions. Bug: T364635 Change-Id: Ifa971333aa22af346bb62d031dc20afc8979992c
This commit is contained in:
parent
ee05f4fb9e
commit
b247c70a22
|
@ -1069,7 +1069,7 @@ ve.init.mw.ArticleTarget.prototype.getVisualDiffGeneratorPromise = function () {
|
|||
return mw.libs.ve.diffLoader.getVisualDiffGeneratorPromise( this.originalDmDocPromise, newRevPromise );
|
||||
} else {
|
||||
return this.originalDmDocPromise.then(
|
||||
( originalDmDoc ) => new ve.dm.VisualDiff( originalDmDoc, this.getSurface().getModel().getAttachedRoot() )
|
||||
( originalDmDoc ) => () => new ve.dm.VisualDiff( originalDmDoc, this.getSurface().getModel().getAttachedRoot() )
|
||||
);
|
||||
}
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue