mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: navigation highlight
/top was getting hightlighted in navigation if you went into a /topic
This commit is contained in:
@@ -244,7 +244,10 @@ app.cacheBuster = null;
|
||||
$('#main-nav li')
|
||||
.removeClass('active')
|
||||
.find('a')
|
||||
.filter(function (i, x) { return window.location.pathname.startsWith(x.getAttribute('href')); })
|
||||
.filter(function (i, x) {
|
||||
return window.location.pathname === x.pathname ||
|
||||
window.location.pathname.startsWith(x.pathname + '/');
|
||||
})
|
||||
.parent()
|
||||
.addClass('active');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user