Skip to content

Commit 89c134a

Browse files
authored
fix(icon): ensure icon data is valid (vueComponent#4460)
close vueComponent#2745
1 parent b0d226d commit 89c134a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/icon/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ import { filterEmpty, getListeners } from '../_util/props-util';
1717
import Base from '../base';
1818

1919
// Initial setting
20-
VueIcon.add(...Object.keys(allIcons).map(key => allIcons[key]));
20+
21+
// https://github.com/vueComponent/ant-design-vue/issues/2745
22+
let validIcons = allIcons.default || allIcons;
23+
24+
VueIcon.add(...Object.keys(validIcons).map(key => validIcons[key]));
2125
setTwoToneColor('#1890ff');
2226
const defaultTheme = 'outlined';
2327
let dangerousTheme;

0 commit comments

Comments
 (0)