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 authored and Julius Marminge committed 2026-02-17 15:12:07 -08:00
1 parent afdfe16931
commit 6d8d39a5d1
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",