mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-08 06:37:48 +02:00
fix(#290): fix tree rendering of files inside a single folder
This commit is contained in:
+10
-2
@@ -361,8 +361,16 @@ angular
|
|||||||
} else {
|
} else {
|
||||||
output += `<a href='/r/${$scope.repoId}${path}'>${name}</a>`;
|
output += `<a href='/r/${$scope.repoId}${path}'>${name}</a>`;
|
||||||
}
|
}
|
||||||
if ($scope.opens[path] && f.child && f.child.length > 1) {
|
if ($scope.opens[path] && f.child) {
|
||||||
output += generate(f.child, parentPath + "/" + f.name);
|
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 += generate(f.child, parentPath + "/" + f.name);
|
||||||
output + "</li>";
|
output + "</li>";
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user