fix(Tabs): Cannot read property 'scrollToActiveTab' of undefined"

vue.runtime.esm.js:619 [Vue warn]: Error in nextTick: "TypeError: Cannot read property 'scrollToActiveTab' of undefined"
found in
---> <TabNav> at packages/tabs/src/tab-nav.vue
       <ElTabs> at packages/tabs/src/tabs.vue
pull/20996/head
Even 2021-05-11 15:42:11 +08:00 committed by GitHub
parent 17de41f3e2
commit 06238963e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@
if (this.$refs.nav) {
this.$nextTick(() => {
this.$refs.nav.$nextTick(_ => {
this.$refs.nav.scrollToActiveTab();
this.$refs.nav && this.$refs.nav.scrollToActiveTab();
});
});
}