Commit 1f71876e9122587ff38827d5054177bcfecae670

Authored by Aresn
Committed by GitHub
2 parents 2ac12de2 a90d1a20

Merge pull request #2522 from yangdan8/patch-4

解决isInsideHiddenElement函数下parentNode.style对象的display报错的bug
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/components/tabs/tabs.vue
@@ -314,7 +314,7 @@ @@ -314,7 +314,7 @@
314 isInsideHiddenElement () { 314 isInsideHiddenElement () {
315 let parentNode = this.$el.parentNode; 315 let parentNode = this.$el.parentNode;
316 while(parentNode && parentNode !== document.body) { 316 while(parentNode && parentNode !== document.body) {
317 - if (parentNode.style.display === 'none') { 317 + if (parentNode.style && parentNode.style.display === 'none') {
318 return parentNode; 318 return parentNode;
319 } 319 }
320 parentNode = parentNode.parentNode; 320 parentNode = parentNode.parentNode;