Skip to content

Commit ffe4cd9

Browse files
authored
[Chore] Update partials count to remove overcounting (#24920)
* [Chore] Update partials count to remove overcounting * prettier
1 parent 73878e4 commit ffe4cd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/components.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ export async function getPartialsUsage(): Promise<Record<string, Usage>> {
9898
process.platform === "win32"
9999
? file.parentPath.replaceAll("\\", "/")
100100
: file.parentPath;
101-
const product = parentPath.split("/")[3];
102-
const partialName = `${product}/${file.name.replace(".mdx", "")}`;
101+
const folderPath = parentPath.split("/").splice(3).join("/");
102+
const partialName = `${folderPath}/${file.name.replace(".mdx", "")}`;
103103
partials[partialName] = { count: 0, pages: new Set() };
104104
}
105105

0 commit comments

Comments
 (0)