Skip to content

Commit

Permalink
fix: issue where c type is any
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <[email protected]>
  • Loading branch information
vinayakkulkarni committed Jul 28, 2023
1 parent 3be4e3c commit d2f83b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ export function getExposeProxy(instance: ComponentInternalInstance) {

const classifyRE = /(?:^|[-_])(\w)/g
const classify = (str: string): string =>
str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '')
str.replace(classifyRE, c => c.toString().toUpperCase()).replace(/[-_]/g, '')

export function getComponentName(
Component: ConcreteComponent,
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const camelizeRE = /-(\w)/g
* @private
*/
export const camelize = cacheStringFunction((str: string): string => {
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))
return str.replace(camelizeRE, (_, c) => (c ? c.toString().toUpperCase() : ''))
})

const hyphenateRE = /\B([A-Z])/g
Expand Down

0 comments on commit d2f83b7

Please sign in to comment.