Skip to content

Commit afcc4f0

Browse files
committed
check if st > tabs.length, which causes problem
1 parent 4b1b2db commit afcc4f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/jquery.smartTab.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
var stt = getTabState();
4848
if(stt) st = stt;
4949
}
50-
st = (st) ? st : 0;
50+
if(!st || st > tabs.length)
51+
st = 0;
5152
showTab(st);
5253
}
5354

0 commit comments

Comments
 (0)