From 83013d3ca664b96eb5e4dad65be8148ed4dd34b2 Mon Sep 17 00:00:00 2001 From: Wout Gevaert Date: Mon, 16 Jan 2023 11:46:48 +0100 Subject: [PATCH] GalleryContextItem: Only count image node children Bug: T320874 Change-Id: Id4c70ece1e54a47e142c6dee3fd25b3519c2fea9 --- modules/ve-mw/ui/contextitems/ve.ui.MWGalleryContextItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/ui/contextitems/ve.ui.MWGalleryContextItem.js b/modules/ve-mw/ui/contextitems/ve.ui.MWGalleryContextItem.js index 4031e3e011..8ff572af50 100644 --- a/modules/ve-mw/ui/contextitems/ve.ui.MWGalleryContextItem.js +++ b/modules/ve-mw/ui/contextitems/ve.ui.MWGalleryContextItem.js @@ -44,7 +44,7 @@ ve.ui.MWGalleryContextItem.static.commandName = 'gallery'; * @inheritdoc */ ve.ui.MWGalleryContextItem.prototype.getDescription = function () { - return ve.msg( 'visualeditor-mwgallerycontext-description', this.model.children.length ); + return ve.msg( 'visualeditor-mwgallerycontext-description', this.model.getImageNodes().length ); }; /* Registration */