Minor logic cleanup

This didn't mean what it looked like: `||` has higher priority, so an
undefined elem would not result in an empty string.

Change-Id: I1e361842f060815b04802a1ab8f077faa1a8bc6b
This commit is contained in:
Adam Wight 2024-02-01 09:44:32 +01:00 committed by WMDE-Fisch
parent 73c90a0e7d
commit 8d0202a664

View file

@ -65,7 +65,7 @@ ve.dm.MWReferenceNode.static.listKeyRegex = /^(auto|literal)\/([\s\S]*)$/;
ve.dm.MWReferenceNode.static.toDataElement = function ( domElements, converter ) {
function getReflistItemHtml( id ) {
const elem = converter.getHtmlDocument().getElementById( id );
return elem && elem.innerHTML || '';
return ( elem && elem.innerHTML ) || '';
}
const mwDataJSON = domElements[ 0 ].getAttribute( 'data-mw' );