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 7c19896 commit 7469356Copy full SHA for 7469356
packages/shared-utils/src/util.ts
@@ -21,7 +21,11 @@ function cached (fn) {
21
22
const classifyRE = /(?:^|[-_/])(\w)/g
23
export const classify = cached((str) => {
24
- return str && str.replace(classifyRE, toUpper)
+ // fix: str.replace may causes '"replace" is not a function' exception.
25
+ // This bug may causes the UI 'Component Filter' to not work properly
26
+ // e.g. The type of 'str' is Number.
27
+ // So need cover 'str' to String.
28
+ return str && ('' + str).replace(classifyRE, toUpper)
29
})
30
31
const camelizeRE = /-(\w)/g
0 commit comments