Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
quidl committed Sep 9, 2024
1 parent 565317d commit aa714a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/service/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ class Agent {
const jobBody = fs.readJsonSync('job.json', { encoding: 'utf-8' });
const { id: jobId } = jobBody;
let parameter = jobBody.parameter;
let projectId = jobBody.testProject?.projectId;
let projectId = jobBody.testProject ? jobBody.testProject.projectId : undefined;

if (!parameter || !projectId) {
const requestJobResponse = await api.getJob(jobId);
if (!(requestJobResponse?.body?.parameter && requestJobResponse?.body?.testProject)) {
if (!(requestJobResponse && requestJobResponse.body && requestJobResponse.body.parameter && requestJobResponse.body.testProject)) {
// There is no job to execute
return;
}
Expand Down

0 comments on commit aa714a1

Please sign in to comment.