Skip to content

Commit

Permalink
Update src/lib/syncDocsPath.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Kanad Gupta <[email protected]>
  • Loading branch information
kellyjosephprice and kanadgupta committed Feb 15, 2024
1 parent 0248fa1 commit f997b02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/syncDocsPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ function sortFiles(files: string[], { allowedFileExtensions }: { allowedFileExte
{},
);

const dependencies = Object.values(filesBySlug).reduce(
const dependencies = Object.values(filesBySlug).reduce<[string, string][]>(
(edges, obj) => {
if (obj.parentDocSlug) {
edges.push([filesBySlug[obj.parentDocSlug].filePath, filesBySlug[obj.slug].filePath]);
}

return edges;
},
[] as [string, string][],
[],
);

return toposort.array(files, dependencies);
Expand Down

0 comments on commit f997b02

Please sign in to comment.