History

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

Julius Marminge committed 9 months ago

Commit 86a2cbc1 parent 3756bbf1 file · +1 −1Browse files

Unified · Split

apps/web/src/components/BranchToolbar.tsx+1−1
@@ -94,7 +94,7 @@ export default function BranchToolbar({ · 93 unmodified lines
94 activeThreadBranch,94 activeThreadBranch,
95 queryBranches,95 queryBranches,
96 });96 });
97 if (!syncedBranch) return;97 if (!activeThreadId || !syncedBranch) return;
98 98
99 dispatch({99 dispatch({
100 type: "SET_THREAD_BRANCH",100 type: "SET_THREAD_BRANCH",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t