Merge "Get rid of one nesting level in highlighting code"

This commit is contained in:
jenkins-bot 2018-11-30 14:58:49 +00:00 committed by Gerrit Code Review
commit 8ae3b13d1a

View file

@ -45,9 +45,10 @@
textNode = textNode.firstChild;
}
if ( textNode.nodeType === Node.TEXT_NODE &&
textNode.data.trim() !== ''
) {
if ( textNode.nodeType !== Node.TEXT_NODE || textNode.data.trim() === '' ) {
return;
}
accessibilityLabel = mw.msg( 'cite_references_link_accessibility_back_label' );
upArrow = textNode.data.trim();
// The text node typically contains "↑ ", and we need to keep the space.
@ -67,7 +68,6 @@
$upArrowLink
);
}
}
$upArrowLink.attr( 'href', $backlink.attr( 'href' ) );
} );