Skip to content
TypeScript

Guard branch sync when no active thread is selected

Julius Marminge6d8d39a5d18b
diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsx
index 30e93270606..d02c94db95d 100644
--- a/apps/web/src/components/BranchToolbar.tsx
+++ b/apps/web/src/components/BranchToolbar.tsx
@@ -94,7 +94,7 @@ export default function BranchToolbar({
activeThreadBranch,
queryBranches,
});
- if (!syncedBranch) return;
+ if (!activeThreadId || !syncedBranch) return;
dispatch({
type: "SET_THREAD_BRANCH",