diff options
| author | Tusooa Zhu <tusooa@kazv.moe> | 2022-04-09 23:49:22 -0400 |
|---|---|---|
| committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-04-09 23:50:29 -0400 |
| commit | 3b02566e16d33956604815e4bd5190f8f8144253 (patch) | |
| tree | 9b70c30db4766be79cf1d5e222f4448847163ab3 | |
| parent | 87311cff09fb19978a050b468a59126c4d13fd2f (diff) | |
Fix tab switcher not working when some tabs hidden
| -rw-r--r-- | src/components/tab_switcher/tab_switcher.jsx | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |
