Skip to content

Commit e8c8cc6

Browse files
committed
fix: handle nullable worker in deployment lookup
1 parent 772119e commit e8c8cc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.ai-generate-payload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ async function getTaskSourceCode(
222222

223223
async function getTaskFromDeployment(environmentId: string, taskIdentifier: string) {
224224
const deployment = await findCurrentWorkerDeployment({ environmentId });
225-
if (!deployment) return null;
225+
if (!deployment?.worker) return null;
226226

227227
const task = deployment.worker.tasks.find((t) => t.slug === taskIdentifier);
228228
if (!task) return null;

0 commit comments

Comments
 (0)