Skip to content

Commit a15f508

Browse files
committed
fix: ensure uppercaseFirst is applied to the result of fitText function
1 parent 9118ad0 commit a15f508

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/.vitepress/data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export const fitText = (text: string) => {
1717

1818
const parse1 = text.split('package for')
1919
const parse2 = (parse1.at(1) ?? parse1.at(0))?.split('providing') ?? []
20-
const fixed = uppercaseFirst(parse2.at(1) ?? parse2.at(0))?.trim()
20+
const fixed = parse2.at(1) ?? parse2.at(0)?.trim() ?? ''
2121

22-
return truncate(fixed, 67, '').trim()
22+
return uppercaseFirst(truncate(fixed, 67, '').trim())
2323
}
2424

2525
export const uppercaseFirst = (value = '') => {

0 commit comments

Comments
 (0)