Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alissawix committed Feb 5, 2024
1 parent e55b7f9 commit c0df5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function toKebabCase(str: string): string {
export function toPascalCase(str: string): string {
const originalWords = splitIntoWords(str);
const strNoConversionToLower = originalWords.map((word) => capitalizeFirstLetter(word)).join('');
if (new RegExp('[a-z]').test(strNoConversionToLower)) {
if (/[a-z]/.test(strNoConversionToLower)) {
return strNoConversionToLower;
}
return originalWords.map((word) => capitalizeFirstLetter(word.toLowerCase())).join('');
Expand Down

0 comments on commit c0df5da

Please sign in to comment.