Skip to content

Commit c656a96

Browse files
committed
fix
1 parent 719c44d commit c656a96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sidebarApps/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ function remove(id) {
5656
app.remove();
5757
apps.splice(apps.indexOf(app), 1);
5858
if (wasActive && apps.length > 0) {
59-
setActiveApp(apps[0].id);
59+
const preferredApp = apps.find((app) => app.id === currentSection);
60+
setActiveApp(preferredApp?.id || apps[0].id);
6061
return;
6162
}
6263

0 commit comments

Comments
 (0)