bugfix #960: Verify project menu element existance before using them
This commit is contained in:
parent
1df93510d4
commit
52583523f5
@ -62,8 +62,10 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
document.querySelector('solid-route[name="admin-projects"]').setAttribute('active','');
|
||||
document.querySelector('.jsRightMenu solid-link[next="admin-projects"]').setAttribute('active','');
|
||||
} else {
|
||||
document.querySelector('solid-route[name="admin-projects"]').removeAttribute('active');
|
||||
document.querySelector('.jsRightMenu solid-link[next="admin-projects"]').removeAttribute('active');
|
||||
let adminProjects = document.querySelector('solid-route[name="admin-projects"]');
|
||||
let rightMenu = document.querySelector('.jsRightMenu solid-link[next="admin-projects"]');
|
||||
if( adminProjects ) adminProjects.removeAttribute('active');
|
||||
if( rightMenu ) rightMenu.removeAttribute('active');
|
||||
}
|
||||
closeLeftMenu();
|
||||
closeUserControls();
|
||||
@ -124,4 +126,4 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user