mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-30 17:54:20 +00:00
Fix: safely handle refs which have no "firstNode"
This can apparently happen when pasting refs from another document. Bug: T247921 Change-Id: Ibe8c4d1625d2b6c9a11d9b4fea85c305f84265fa
This commit is contained in:
parent
08969af51c
commit
a0af51b476
|
@ -61,7 +61,7 @@ ve.dm.MWDocumentReferences.prototype.getGroupRefsByParents = function ( groupNam
|
|||
const seenTopLevelNames = new Set(
|
||||
indexOrder
|
||||
.map( ( index ) => nodeGroup.firstNodes[ index ] )
|
||||
.filter( ( node ) => !node.element.attributes.extendsRef )
|
||||
.filter( ( node ) => node && !node.element.attributes.extendsRef )
|
||||
.map( ( node ) => node.element.attributes.listKey )
|
||||
.filter( ( listKey ) => listKey )
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue