mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Modificaciones
This commit is contained in:
@ -424,12 +424,14 @@ $picture = "/assets/img/default-user.png";
|
||||
tempAnchor.href = href;
|
||||
const linkPath = tempAnchor.pathname;
|
||||
|
||||
// Comparación exacta de ruta
|
||||
if (browserUrl === linkPath) {
|
||||
// Corrección: coincide si es igual o si browserUrl empieza con el linkPath + '/'
|
||||
if (browserUrl === linkPath || browserUrl.startsWith(linkPath + '/')) {
|
||||
const menuItem = link.closest('.menu-item');
|
||||
menuItem.classList.add('active');
|
||||
if (menuItem) {
|
||||
menuItem.classList.add('active');
|
||||
}
|
||||
|
||||
const parent = menuItem.closest('.menu-sub');
|
||||
const parent = menuItem?.closest('.menu-sub');
|
||||
if (parent) {
|
||||
const parentItem = parent.closest('.menu-item');
|
||||
if (parentItem) {
|
||||
|
||||
Reference in New Issue
Block a user