mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Merge "Add safe-guard to ReferenceSearchWidget.buildIndex"
This commit is contained in:
commit
a6405f230e
|
@ -125,7 +125,7 @@ ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
|
|||
for ( let j = 0; j < indexOrder.length; j++ ) {
|
||||
const refNode = firstNodes[ indexOrder[ j ] ];
|
||||
// Exclude placeholder references
|
||||
if ( refNode.getAttribute( 'placeholder' ) ) {
|
||||
if ( !refNode || refNode.getAttribute( 'placeholder' ) ) {
|
||||
continue;
|
||||
}
|
||||
// Only increment counter for real references
|
||||
|
|
Loading…
Reference in a new issue