Skip to content

Commit 28362c4

Browse files
superdav42claude
andcommitted
Deduplicate file list from fast-glob as safety guard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 01fa90c commit 28362c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/translate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,12 +508,12 @@ async function main() {
508508
console.log(`Debug: ${opts.debug}`);
509509
console.log('');
510510

511-
// Find all doc files
512-
const files = await fg(['**/*.md', '**/*.mdx'], {
511+
// Find all doc files (dedupe to guard against glob returning overlapping results)
512+
const files = [...new Set(await fg(['**/*.md', '**/*.mdx'], {
513513
cwd: DOCS_DIR,
514514
absolute: true,
515515
ignore: ['**/node_modules/**'],
516-
});
516+
}))];
517517

518518
console.log(`Found ${files.length} doc files`);
519519
console.log('');

0 commit comments

Comments
 (0)