Skip to content

Commit c86a261

Browse files
committed
fix: tooltip throws exception in some cases #1519
1 parent 9723a62 commit c86a261

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/tooltip/Tooltip.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ export default {
8282
(isAntBtn &&
8383
(ele.componentOptions.propsData.disabled ||
8484
ele.componentOptions.propsData.disabled === '')) ||
85-
(ele.tag === 'button' && ele.data && ele.data.attrs.disabled !== false)
85+
(ele.tag === 'button' &&
86+
ele.data &&
87+
ele.data.attrs &&
88+
ele.data.attrs.disabled !== undefined)
8689
) {
8790
// Pick some layout related style properties up to span
8891
// Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254

0 commit comments

Comments
 (0)