diff --git a/packages/dashboard/app/components/MergeAdvanceNotice.tsx b/packages/dashboard/app/components/MergeAdvanceNotice.tsx index 24bb3a0f8..1cc70be03 100644 --- a/packages/dashboard/app/components/MergeAdvanceNotice.tsx +++ b/packages/dashboard/app/components/MergeAdvanceNotice.tsx @@ -113,7 +113,12 @@ export default function MergeAdvanceNotice({ projectId, apiBase = "/api" }: Merg return null; } - const localChangesPreserved = notice.userCheckout.dirty || notice.userCheckout.untrackedCount > 0; + if (!notice.userCheckout) { + return null; + } + + const checkout = notice.userCheckout; + const localChangesPreserved = checkout.dirty || checkout.untrackedCount > 0; const dismiss = () => { const next = [...dismissedShas.filter((sha) => sha !== notice.toSha), notice.toSha].slice(-50); @@ -148,7 +153,7 @@ export default function MergeAdvanceNotice({ projectId, apiBase = "/api" }: Merg
{notice.integrationBranch} advanced to {shortSha(notice.toSha)}.{" "} - Your checked-out copy at {notice.userCheckout.worktreePath} is behind. + Your checked-out copy at {checkout.worktreePath} is behind. {localChangesPreserved ? " (local changes preserved)" : ""} {pullError ? {pullError} : null} {pulling ? Pulling… : null}