Skip to content

Commit

Permalink
A weird fix for race-conditions on closing async loaded source tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanrhu committed Dec 17, 2022
1 parent 25fa011 commit a8b7673
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/components/FileTabs/js/FileTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,11 @@
var switch_to = data.switches.pop();

if (switch_to) {
data.switchFile({file: switch_to});
if (switch_to == file) {
data.switchFile({file: data.files[data.files.length-1]});
} else {
data.switchFile({file: switch_to});
}
} else {
data.switchFile({file: data.files[0]});
}
Expand Down

0 comments on commit a8b7673

Please sign in to comment.