fix: narrow pending tab swap target path

This commit is contained in:
Test
2026-04-09 12:38:39 +02:00
parent b390dbaf77
commit 5dc2fe9341

View File

@@ -395,12 +395,15 @@ function useTabSwapEffect(options: {
if (!rememberPendingTabArrival(activeTabPath, activeTab, pendingTabArrivalPathRef)) {
return
}
const targetPath = activeTabPath
const readyActiveTab = activeTab
if (!targetPath || !readyActiveTab) return
scheduleTabSwap({
editor,
cache,
targetPath: activeTabPath,
activeTab: activeTab!,
targetPath,
activeTab: readyActiveTab,
pendingSwapRef,
prevActivePathRef,
rawSwapPendingRef,