Skip to content

Commit

Permalink
fix(docs): handle duplicated routes in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Oct 23, 2024
1 parent 45fa8e5 commit 52e72e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/workflow/build-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,17 @@ function generateMd(lang) {
}
});

const processedPaths = new Set();

for (const realPath of realPaths) {
const data = docs[category][namespace].routes[realPath];
if (Array.isArray(data.path)) {
if (processedPaths.has(data.path[0])) {
continue;
}
processedPaths.add(data.path[0]);
}

const test = testResult.find((t) => t.title === realPath);
const parsedTest = test
? {
Expand Down

0 comments on commit 52e72e2

Please sign in to comment.