Skip to content

Commit e9b13ab

Browse files
authored
Merge pull request youlaitech#54 from wangji1042/master
fix(IconSelect): 🐛 修复构建时提示iconComponent.name可能为undefined的报错;
2 parents cc71a45 + 01bc58b commit e9b13ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/IconSelect/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function loadIcons() {
169169
type IconNames = keyof typeof ElementPlusIconsVue;
170170
const renderIcon = (iconName: string) => {
171171
const iconComponent = ElementPlusIconsVue[iconName as IconNames];
172-
if (iconComponent) {
172+
if (iconComponent && iconComponent.name) {
173173
return h(resolveComponent(iconComponent.name));
174174
}
175175
return null;

0 commit comments

Comments
 (0)