Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit d207b82

Browse files
committed
fix(util): remove leading space on titlecase
Don't add a leading space to a string when titlecased. --- src/utilities/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
1 parent fcffe6d commit d207b82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utilities/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ function addSpaceAndUpper(char) {
55
}
66

77
export function _titlecase(name) {
8-
return (name.charAt(0).toUpperCase() + name.slice(1)).replace(capitalMatcher, addSpaceAndUpper);
8+
return name.charAt(0).toUpperCase() + name.slice(1).replace(capitalMatcher, addSpaceAndUpper);
99
}

0 commit comments

Comments
 (0)