fix for root element

This commit is contained in:
Mylloon 2024-11-28 17:11:40 +01:00
parent ea7d962a17
commit 0a1a258e24
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -62,6 +62,10 @@ const uncollapse = (element) => {
* @returns
*/
const deepestNodeOpened = (path, options) => {
if (path[0] === "") {
return options[0].parentNode.parentNode;
}
// Iterate over possible options
for (let i = 0; i < options.length; ++i) {
// If the directory and the current path match