Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit cf06ab7

Browse files
darkwingjasonLaster
authored andcommitted
The (index) is not a directory (#5347)
1 parent 47b0a9a commit cf06ab7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/sources-tree/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export function isDirectory(url: Object) {
3030
// Assume that all urls point to files except when they end with '/'
3131
// Or directory node has children
3232
return (
33-
parts.length === 0 || url.path.slice(-1) === "/" || nodeHasChildren(url)
33+
(parts.length === 0 ||
34+
url.path.slice(-1) === "/" ||
35+
nodeHasChildren(url)) &&
36+
url.name != "(index)"
3437
);
3538
}
3639

0 commit comments

Comments
 (0)