From 3b02566e16d33956604815e4bd5190f8f8144253 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Sat, 9 Apr 2022 23:49:22 -0400 Subject: [PATCH] Fix tab switcher not working when some tabs hidden --- src/components/tab_switcher/tab_switcher.jsx | 2 +- 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 index f5a1e603..c8d390bc 100644 --- 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 }