mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 08:20:02 +00:00
Fix null reference error in 2017 source editor
Looking for other references can (as of now) never work in source mode. There are never other references or reference lists. Bug: T373661 Change-Id: Icaad4e71a1538c5fad6a0f016b342a7cb7b9db2f
This commit is contained in:
parent
617ca08892
commit
581d987b88
|
@ -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