commit: 3b02566e16d33956604815e4bd5190f8f8144253
parent 87311cff09fb19978a050b468a59126c4d13fd2f
Author: Tusooa Zhu <tusooa@kazv.moe>
Date: Sat, 9 Apr 2022 23:49:22 -0400
Fix tab switcher not working when some tabs hidden
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx
@@ -50,7 +50,7 @@ export default {
activeIndex () {
// In case of controlled component
if (this.activeTab) {
- return this.slots().findIndex(slot => this.activeTab === slot.props.key)
+ return this.slots().findIndex(slot => slot && slot.props && this.activeTab === slot.props.key)
} else {
return this.active
}