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
9494 activeThreadBranch,
9595 queryBranches,
9696 });
97− if (!syncedBranch) return;
97+ if (!activeThreadId || !syncedBranch) return;
9898
9999 dispatch({
100100 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