fix potential bug to render active tab in controlled way

This commit is contained in:
taehoon 2019-08-10 00:25:09 -04:00
parent 9dd9ba0205
commit eafd53f994

View file

@ -71,7 +71,7 @@ export default Vue.component('tab-switcher', {
const contents = this.$slots.default.map((slot, index) => {
if (!slot.tag) return
const active = index === this.active
const active = this.isActiveTab(index)
if (this.renderOnlyFocused) {
return active
? <div class="active">{slot}</div>