Skip to content

Commit e302db3

Browse files
committed
refactor: 增加激活标签页空保护
1 parent b414983 commit e302db3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/BootstrapBlazor/Components/Tab/Tab.razor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ const active = tab => {
5656
resize(tab)
5757

5858
const activeTab = tab.tabNav.querySelector('.tabs-item-wrap.active')
59+
if (activeTab === null) {
60+
return
61+
}
5962
if (activeTab) {
6063
if (tab.vertical) {
6164
const top = getPosition(activeTab).top - getPosition(activeTab.parentNode).top + activeTab.offsetHeight

0 commit comments

Comments
 (0)