Remove dead extra comparison from VE JavaScript code

The first code snippet in this while already covers this case. The loop
will end the moment it can't find another parent any more.

This was found via
https://sonarcloud.io/project/issues?id=mediawiki-extensions-Cite&types=BUG
as a potential bug. After looking at the code I'm sure it's not one.

Change-Id: Id914252c88b27420dfa47dcc918fc58d9ee2a65d
This commit is contained in:
Thiemo Kreuz 2019-05-17 15:24:26 +02:00 committed by Thiemo Kreuz (WMDE)
parent e834fbe25e
commit d622356a73

View file

@ -212,11 +212,12 @@ ve.ce.MWReferencesListNode.prototype.update = function () {
return false;
}
// Exclude references defined inside the references list node
while ( ( node = node.parent ) && node !== null ) {
do {
node = node.parent;
if ( node instanceof ve.dm.MWReferencesListNode ) {
return false;
}
}
} while ( node );
return true;
} );