diff --git a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js index b6fbd61d9..200961172 100644 --- a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js +++ b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js @@ -134,7 +134,7 @@ ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () { const itemNode = this.internalList.getItemNode( refModel.getListIndex() ); const refGroup = refModel.getGroup(); - const citation = ( refGroup && refGroup.length ? refGroup + ' ' : '' ) + n; + const citation = ( refGroup ? refGroup + ' ' : '' ) + n; // Use [\s\S]* instead of .* to catch esoteric whitespace (T263698) const matches = refModel.getListKey().match( /^literal\/([\s\S]*)$/ ); const name = matches && matches[ 1 ] || '';