diff --git a/src/renderer/src/components/workspace-cleanup/use-workspace-cleanup-git-evidence.ts b/src/renderer/src/components/workspace-cleanup/use-workspace-cleanup-git-evidence.ts index 8ca7e538f05..31bbbe57e2f 100644 --- a/src/renderer/src/components/workspace-cleanup/use-workspace-cleanup-git-evidence.ts +++ b/src/renderer/src/components/workspace-cleanup/use-workspace-cleanup-git-evidence.ts @@ -74,7 +74,7 @@ export function useWorkspaceCleanupGitEvidence({ const queueIndex = queueRef.current.findIndex( (worktreeId) => !activeRequestWorktreeIdsRef.current.has(worktreeId) ) - if (queueIndex < 0) { + if (queueIndex === -1) { break } const [worktreeId] = queueRef.current.splice(queueIndex, 1)