workflow: fix checkLinks script

This commit is contained in:
Evan You
2018-06-10 11:36:16 -04:00
parent 2b12c81998
commit e8815caa49

View File

@@ -42,10 +42,12 @@ function checkFiles (folder, recursive = false) {
const fullPath = path.join(folder, file)
if (file === 'ui.js') {
checkLinks(fullPath)
} else if (file === 'ui' && fs.statSync(fullPath).isDirectory()) {
checkLinks(path.join(fullPath, 'index.js'))
} else if (recursive) {
checkFiles(fullPath)
} else if (fs.statSync(fullPath).isDirectory()) {
if (file === 'ui') {
checkLinks(path.join(fullPath, 'index.js'))
} else if (recursive) {
checkFiles(fullPath)
}
}
}
}