Skip to content

Commit 9421fae

Browse files
authored
Apply suggestions from code review
1 parent ce0740c commit 9421fae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/build/mdn-comments.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ const paths: Record<string, string[]> = {
2222
"webassembly-static-method": ["methods", "method"],
2323
};
2424

25-
function extractSlug(slug: string): string[] {
25+
function extractSlug(mdnUrl: string): string[] {
2626
for (const subdirectory of subdirectories) {
27-
if (!slug.toLowerCase().startsWith(subdirectory)) {
27+
if (!mdnUrl.toLowerCase().startsWith(subdirectory)) {
2828
continue;
2929
}
30-
return slug
30+
return mdnUrl
3131
.slice(subdirectory.length)
3232
.replace(/_static/g, "")
3333
.split("/");

0 commit comments

Comments
 (0)