From e8815caa49ad4e17056738fa48992300f7b21da8 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 10 Jun 2018 11:36:16 -0400 Subject: [PATCH] workflow: fix checkLinks script --- scripts/checkLinks.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/checkLinks.js b/scripts/checkLinks.js index 957c9101d..e0626b9cf 100644 --- a/scripts/checkLinks.js +++ b/scripts/checkLinks.js @@ -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) + } } } }