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:
Julius Marminge committed 2026-02-17 14:27:09 -08:00
1 parent 3756bbf5cd
commit 86a2cbc3d4
1 file changed
+1 -1
+1 -1
View File
@@ -94,7 +94,7 @@ export default function BranchToolbar({
activeThreadBranch,
queryBranches,
});
if (!syncedBranch) return;
if (!activeThreadId || !syncedBranch) return;
dispatch({
type: "SET_THREAD_BRANCH",