Tabs: fix exception in scrollToActiveTab (#10187)

pull/10189/head
杨奕 2018-03-15 15:08:15 +08:00 committed by GitHub
parent b60c2cac8c
commit bfd7d0236c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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();