mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
Merge "Fix null reference error in 2017 source editor"
This commit is contained in:
commit
4b92287348
|
@ -195,7 +195,8 @@ ve.dm.MWGroupReferences.prototype.getInternalModelNode = function ( key ) {
|
|||
* @return {ve.dm.MWReferenceNode[]}
|
||||
*/
|
||||
ve.dm.MWGroupReferences.prototype.getRefUsages = function ( key ) {
|
||||
return ( this.nodeGroup.keyedNodes[ key ] || [] )
|
||||
// T373661: This might never have been set in source mode
|
||||
return ( this.nodeGroup && this.nodeGroup.keyedNodes[ key ] || [] )
|
||||
.filter( ( node ) => !node.getAttribute( 'placeholder' ) &&
|
||||
!node.findParent( ve.dm.MWReferencesListNode )
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue