mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Use getImageNodes instead of custom filter
Bug: T320874 Change-Id: I4ef69ea2395f310ce48f3e32bbf202713e2c7f15
This commit is contained in:
parent
cbb6445e3b
commit
0b75660801
|
@ -44,9 +44,7 @@ ve.ui.MWGalleryContextItem.static.commandName = 'gallery';
|
|||
* @inheritdoc
|
||||
*/
|
||||
ve.ui.MWGalleryContextItem.prototype.getDescription = function () {
|
||||
return ve.msg( 'visualeditor-mwgallerycontext-description', this.model.children.filter( function ( node ) {
|
||||
return node instanceof ve.dm.MWGalleryImageNode;
|
||||
} ).length );
|
||||
return ve.msg( 'visualeditor-mwgallerycontext-description', this.model.getImageNodes().length );
|
||||
};
|
||||
|
||||
/* Registration */
|
||||
|
|
Loading…
Reference in a new issue