fix: tooltip throws exception in some cases #1519

pull/1794/head^2
tanjinzhou 2019-12-06 18:18:52 +08:00
parent 9723a6253e
commit c86a261bca
1 changed files with 4 additions and 1 deletions

View File

@ -82,7 +82,10 @@ export default {
(isAntBtn && (isAntBtn &&
(ele.componentOptions.propsData.disabled || (ele.componentOptions.propsData.disabled ||
ele.componentOptions.propsData.disabled === '')) || ele.componentOptions.propsData.disabled === '')) ||
(ele.tag === 'button' && ele.data && ele.data.attrs.disabled !== false) (ele.tag === 'button' &&
ele.data &&
ele.data.attrs &&
ele.data.attrs.disabled !== undefined)
) { ) {
// Pick some layout related style properties up to span // Pick some layout related style properties up to span
// Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254 // Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254