Skip to content

Commit

Permalink
Merge pull request #39 from claudeberube/oldIndex-fix
Browse files Browse the repository at this point in the history
fix for undefined oldIndex when using dynamic tabs reset.
  • Loading branch information
cristijora authored Mar 26, 2018
2 parents 487151a + af8959e commit 85eaa5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-nav-tabs",
"version": "0.5.6",
"version": "0.5.7",
"description": "A vue based tab component",
"repository": {
"url": "cristijora/vue-tabs",
Expand Down
2 changes: 1 addition & 1 deletion src/components/VueTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default {
this.$emit('input', tab.title)
},
changeTab (oldIndex, newIndex, route) {
let oldTab = this.tabs[oldIndex]
let oldTab = this.tabs[oldIndex] || {}
let newTab = this.tabs[newIndex]
if (newTab.disabled) return;
this.activeTabIndex = newIndex
Expand Down

0 comments on commit 85eaa5b

Please sign in to comment.