Skip to content
Snippets Groups Projects
Commit 52583523 authored by Fabien Quatravaux's avatar Fabien Quatravaux Committed by Jean-Baptiste Pasquier
Browse files

bugfix #960: Verify project menu element existance before using them

parent 1df93510
No related branches found
Tags v0.5.125
1 merge request!257Maintenance/fix 960
Pipeline #9874 passed
......@@ -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() {
});
}
);
});
\ No newline at end of file
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment