mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-15 10:59:56 +00:00
Use stricter test for originalDomElementsIndex
Change-Id: I43a0f639fa50fb2bbe9f935dd141d595571d8e24
This commit is contained in:
parent
a42c656c53
commit
4c0e837dad
|
@ -216,7 +216,7 @@ ve.dm.MWReferenceNode.static.toDomElements = function ( dataElement, doc, conver
|
|||
el.setAttribute( 'data-mw', originalMw );
|
||||
|
||||
// Return the original DOM elements if possible
|
||||
if ( dataElement.originalDomElementsIndex ) {
|
||||
if ( dataElement.originalDomElementsIndex !== undefined ) {
|
||||
return ve.copyDomElements( converter.getStore().value( dataElement.originalDomElementsIndex ), doc );
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -80,7 +80,7 @@ ve.dm.MWReferencesListNode.static.toDomElements = function ( data, doc, converte
|
|||
attribs = dataElement.attributes,
|
||||
contentsData = data.slice( 1, -1 );
|
||||
|
||||
if ( dataElement.originalDomElementsIndex ) {
|
||||
if ( dataElement.originalDomElementsIndex !== undefined ) {
|
||||
// If there's more than 1 element, preserve entire array, not just first element
|
||||
els = ve.copyDomElements( converter.getStore().value( dataElement.originalDomElementsIndex ), doc );
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue