diff --git a/static/js/cours.js b/static/js/cours.js index a98a7af..596181e 100644 --- a/static/js/cours.js +++ b/static/js/cours.js @@ -65,20 +65,17 @@ const deepestNodeOpened = (path, options) => { // Iterate over possible options for (let i = 0; i < options.length; ++i) { // If the directory and the current path match - if (path[0] === options[i].firstChild.nodeValue) { + if (decodeURI(path[0]) === options[i].firstChild.nodeValue) { if (path.length === 1) { // We found it return options[i]; } // Continue the search - let returned_value = deepestNodeOpened( + return deepestNodeOpened( path.slice(1), options[i].querySelector("ul").childNodes ); - if (returned_value) { - return returned_value; - } } } };