Explorar o código

Tabs: fix exception in scrollToActiveTab (#10187)

杨奕 %!s(int64=7) %!d(string=hai) anos
pai
achega
bfd7d0236c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      packages/tabs/src/tab-nav.vue

+ 1 - 0
packages/tabs/src/tab-nav.vue

@@ -81,6 +81,7 @@
         if (!this.scrollable) return;
         const nav = this.$refs.nav;
         const activeTab = this.$el.querySelector('.is-active');
+        if (!activeTab) return;
         const navScroll = this.$refs.navScroll;
         const activeTabBounding = activeTab.getBoundingClientRect();
         const navScrollBounding = navScroll.getBoundingClientRect();