Skip to content

Commit 808c1dd

Browse files
matt2eclaude
andcommitted
fix(staged): fix variable-used-before-assignment in getBranchTimeline
Use definite assignment assertion for self-referencing promise variable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 521e3d1 commit 808c1dd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/staged/src/lib/commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ export function getBranchTimeline(
405405
// Use cachedInvoke so IndexedDB serves data on cold start while the network
406406
// fetch runs in parallel (SWR). The first yield may be cached; the last is
407407
// always the freshest available value.
408-
const request = (async () => {
408+
let request!: Promise<BranchTimeline>;
409+
request = (async () => {
409410
let timeline: BranchTimeline | undefined;
410411
for await (const { data } of cachedInvoke<BranchTimeline>(
411412
'get_branch_timeline',

0 commit comments

Comments
 (0)