mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
fix: 修复 generateIcon 可能传入 jsx.element 对象时的报错 (#2890)
This commit is contained in:
parent
9cd89bd2ee
commit
4821cfcb48
@ -17,6 +17,10 @@ export const generateIcon = (
|
||||
className?: string,
|
||||
classNameProp?: string
|
||||
) => {
|
||||
if (React.isValidElement(icon)) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
const isURLIcon = icon?.indexOf('.') !== -1;
|
||||
|
||||
return icon ? (
|
||||
|
Loading…
Reference in New Issue
Block a user