Skip to content

Commit 3f65e0f

Browse files
Bashamegasaschanaz
andauthored
Update src/build/mdn-comments.ts
Co-authored-by: Kagami Sascha Rosylight <[email protected]>
1 parent 0ffb148 commit 3f65e0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/build/mdn-comments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function extractSummary(markdown: string): string {
5151

5252
async function walkDirectory(dir: URL): Promise<URL[]> {
5353
const entries = await fs.readdir(dir, { withFileTypes: true });
54-
const parentDirName = dir.pathname.split("/").filter(Boolean).slice(-1)[0];
54+
const parentDirName = dir.pathname.split("/").at(-1);
5555
let results: URL[] = [];
5656

5757
for (const entry of entries) {

0 commit comments

Comments
 (0)