fix(#290): fix tree rendering of files inside a single folder

This commit is contained in:
tdurieux
2024-05-15 11:18:16 +02:00
parent a30d5b31a6
commit e9e881fdc3
2 changed files with 11 additions and 3 deletions

View File

@@ -361,8 +361,16 @@ angular
} else {
output += `<a href='/r/${$scope.repoId}${path}'>${name}</a>`;
}
if ($scope.opens[path] && f.child && f.child.length > 1) {
output += generate(f.child, parentPath + "/" + f.name);
if ($scope.opens[path] && f.child) {
if (f.child.length > 1) {
output += generate(f.child, path);
} else if (dir) {
current = f.child;
while (current && current.length == 1) {
current = current[0].child;
}
output += generate(current, path);
}
}
// output += generate(f.child, parentPath + "/" + f.name);
output + "</li>";

File diff suppressed because one or more lines are too long