Guard worktree cleanup on missing project

Co-authored-by: codex <[email protected]>
This commit is contained in:
Julius Marmingeandcodex authored and Julius Marminge committed 2026-02-12 22:57:56 -08:00
1 parent 0068a93cfa
commit 8a4fed1bf2
1 file changed
+2 -2
+2 -2
View File
@@ -298,13 +298,13 @@ export default function Sidebar() {
dispatch({ type: "DELETE_THREAD", threadId });
if (!shouldDeleteWorktree || !orphanedWorktreePath) {
if (!shouldDeleteWorktree || !orphanedWorktreePath || !threadProject) {
return;
}
try {
await api.git.removeWorktree({
cwd: threadProject?.cwd ?? orphanedWorktreePath,
cwd: threadProject.cwd,
path: orphanedWorktreePath,
});
} catch {