ignore JS only links when simplifying the sidebar

This commit is contained in:
Andreas Gohr 2021-11-09 12:16:26 +01:00
commit 63c9c46151

View file

@ -141,7 +141,7 @@ jQuery(function () {
* and use a direct link.
*/
var $links = jQuery($wrap[0]).find('a');
if ($links.length == 1) {
if ($links.length === 1 && $links.first().attr('href') !== '#') {
$toggler.children().first().attr('href', jQuery($links[0]).attr('href'));
} else {
$wrap.insertAfter($me);