fix: capitalizeFirst error

This commit is contained in:
wangruidong
2024-01-15 19:24:22 +08:00
committed by 老广
parent 327ebeaa53
commit 5bad1f397d

View File

@@ -417,7 +417,7 @@ export function formatFileSize(bytes) {
export function capitalizeFirst(string) {
if (!string) return string
return string.split(' ').map(item => {
return string.trim().split(' ').map(item => {
return item[0].toUpperCase() + item.slice(1)
}).join(' ')
}