Merge pull request #7467 from overleaf/em-bad-filetree

Find file trees that have null folder entries

GitOrigin-RevId: aa4c7ed180479288d4ce26549ceeaa0f5ebbd298
This commit is contained in:
Eric Mc Sween 2022-04-07 11:09:51 -04:00 committed by Copybot
parent b3d55fa65e
commit ed40ce27ab

View file

@ -41,6 +41,9 @@ function findBadPaths(folder) {
}
if (folder.folders && Array.isArray(folder.folders)) {
for (const [i, subfolder] of folder.folders.entries()) {
if (!subfolder) {
result.push(`folders.${i}`)
}
for (const badPath of findBadPaths(subfolder)) {
result.push(`folders.${i}.${badPath}`)
}