Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Erik van der Boom 2026-07-22 00:21:21 +02:00 committed by GitHub
parent e171482f9a
commit 83ea70b9d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1734,7 +1734,9 @@ function fileMatchesLanguage(root: string, file: string, language: string): bool
function getStoryScanRoots(root: string, language: string): string[] {
const storyRoot = path.join(root, storyFolder(root));
if (!fs.existsSync(storyRoot) || !fs.statSync(storyRoot).isDirectory()) {
try {
if (!fs.statSync(storyRoot).isDirectory()) { return []; }
} catch {
return [];
}
if (language === 'ALL') {