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('solid-route[name="admin-projects"]').setAttribute('active','');
|
||||||
document.querySelector('.jsRightMenu solid-link[next="admin-projects"]').setAttribute('active','');
|
document.querySelector('.jsRightMenu solid-link[next="admin-projects"]').setAttribute('active','');
|
||||||
} else {
|
} else {
|
||||||
document.querySelector('solid-route[name="admin-projects"]').removeAttribute('active');
|
let adminProjects = document.querySelector('solid-route[name="admin-projects"]');
|
||||||
document.querySelector('.jsRightMenu solid-link[next="admin-projects"]').removeAttribute('active');
|
let rightMenu = document.querySelector('.jsRightMenu solid-link[next="admin-projects"]');
|
||||||
|
if( adminProjects ) adminProjects.removeAttribute('active');
|
||||||
|
if( rightMenu ) rightMenu.removeAttribute('active');
|
||||||
}
|
}
|
||||||
closeLeftMenu();
|
closeLeftMenu();
|
||||||
closeUserControls();
|
closeUserControls();
|
||||||
|
Loading…
Reference in New Issue
Block a user