Skip to content

Commit a75dc2b

Browse files
author
hocgin
committed
dev
1 parent 721f88d commit a75dc2b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/_utils/kit.ui.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ export default class UIKit {
3030
* @param name
3131
*/
3232
public static getIcon(name?: string): JSX.Element {
33+
if (!name) return;
3334
const IconMap: Record<string, any> = {
3435
default: ICONS['BuildOutlined'],
3536
};
36-
let Element = IconMap[name || 'default'];
37+
let Element = IconMap[name];
3738
return React.createElement(Element ?? ICONS[name], {});
3839
}
3940

0 commit comments

Comments
 (0)