Guard branch sync when no active thread is selected
- Prevent `SET_THREAD_BRANCH` dispatch unless both `activeThreadId` and `syncedBranch` exist - Avoids updating thread-branch state without an active thread context
This commit is contained in:
1 parent
3756bbf5cd
commit
86a2cbc3d4
1 file changed
+1
-1
@@ -94,7 +94,7 @@ export default function BranchToolbar({
|
||||
activeThreadBranch,
|
||||
queryBranches,
|
||||
});
|
||||
if (!syncedBranch) return;
|
||||
if (!activeThreadId || !syncedBranch) return;
|
||||
|
||||
dispatch({
|
||||
type: "SET_THREAD_BRANCH",
|
||||
|
||||
Reference in new issue
Block a user