fix: Fix the issue of abnormal redirection after deleting a tab (#10774)

Refs #10767
This commit is contained in:
ssongliu 2025-10-27 17:54:16 +08:00 committed by GitHub
parent 4253b48bba
commit 2836207850
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,6 +49,9 @@ const tabChange = (tabPath) => {
const closeTab = (tabPath) => {
const lastTabPath = tabsStore.removeTab(tabPath);
if (tabPath !== tabsStore.activeTabPath) {
return;
}
if (lastTabPath) {
tabChange(lastTabPath);
}