fix: prop value is symbol and invalid type error

This commit is contained in:
virgosoy 2023-03-01 17:28:33 +08:00 committed by GitHub
parent 98f1934811
commit b0951ef8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -712,6 +712,9 @@ function getInvalidTypeMessage(
* dev only
*/
function styleValue(value: unknown, type: string): string {
if (typeof value === 'symbol') {
value = value.toString()
}
if (type === 'String') {
return `"${value}"`
} else if (type === 'Number') {