Skip to content

Commit b4a7cd4

Browse files
authored
Fix clean abandoned file job (#1419)
1 parent f6b112e commit b4a7cd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/clean-abandoned-files.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function checkDir(path, index) {
1818
const fullname = subdir + "/" + filename
1919
if (!index.results.find(spec =>
2020
spec[subdir] === fullname ||
21-
spec[subdir]?.find(extract => extract.file === fullname))) {
21+
(Array.isArray(spec[subdir]) &&
22+
spec[subdir].find(extract => extract.file === fullname)))) {
2223
fs.unlinkSync(path + "/" + filename);
2324
}
2425
}

0 commit comments

Comments
 (0)