Ensure to remove only the tab from the list of tabs
Tab.close can be called multiple times (ex: closing wizard running in a tab) so the indexOf can return -1 if the tab has already been removed. issue8431 review263691002
This commit is contained in:
1 parent
7474935810
commit
3557de1de3
1 file changed
+4
-1
+4
-1
@@ -283,7 +283,10 @@
|
||||
}
|
||||
tab.remove();
|
||||
content.remove();
|
||||
Sao.Tab.tabs.splice(Sao.Tab.tabs.indexOf(this), 1);
|
||||
var i = Sao.Tab.tabs.indexOf(this);
|
||||
if (i >= 0) {
|
||||
Sao.Tab.tabs.splice(i, 1);
|
||||
}
|
||||
if (next.length) {
|
||||
next.find('a').tab('show');
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user