We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64b0417 commit 36c632bCopy full SHA for 36c632b
src/helpers/index.ts
@@ -16,5 +16,5 @@ export function shortString(value: string, limit = 3) {
16
}
17
18
export function ucFirst(value: string) {
19
- return `${value[0].toUpperCase()}${value.slice(1, value.length)}`;
+ return `${(value[0] || "").toUpperCase()}${(value || "").slice(1, value.length)}`;
20
0 commit comments