mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-30 17:54:20 +00:00
Merge "Remove confusing, unnecessary .length check on a string"
This commit is contained in:
commit
7906b2147a
|
@ -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 ] || '';
|
||||
|
|
Loading…
Reference in a new issue