Merge "Add safe-guard to ReferenceSearchWidget.buildIndex"

This commit is contained in:
jenkins-bot 2024-04-30 10:38:09 +00:00 committed by Gerrit Code Review
commit a6405f230e

View file

@ -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