Skip to content

Commit a8b7673

Browse files
committed
A weird fix for race-conditions on closing async loaded source tabs
1 parent 25fa011 commit a8b7673

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/components/FileTabs/js/FileTabs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,11 @@
11431143
var switch_to = data.switches.pop();
11441144

11451145
if (switch_to) {
1146-
data.switchFile({file: switch_to});
1146+
if (switch_to == file) {
1147+
data.switchFile({file: data.files[data.files.length-1]});
1148+
} else {
1149+
data.switchFile({file: switch_to});
1150+
}
11471151
} else {
11481152
data.switchFile({file: data.files[0]});
11491153
}

0 commit comments

Comments
 (0)