screwdriver-api 8.0.40 → 8.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "8.0.40",
3
+ "version": "8.0.41",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -167,12 +167,12 @@ async function getStageJobBuilds({ stage, event, jobFactory }) {
167
167
  const jobName = prStageName ? `${prStageName[1]}:${n.name}` : n.name;
168
168
  const job = await jobFactory.get({ pipelineId: event.pipelineId, name: jobName });
169
169
 
170
- return job.id;
170
+ return job ? job.id : null;
171
171
  })
172
172
  );
173
173
 
174
174
  // Get all builds in a stage for this event
175
- return event.getBuilds({ params: { jobId: stageJobIds } });
175
+ return event.getBuilds({ params: { jobId: stageJobIds.filter(id => id !== null) } });
176
176
  }
177
177
 
178
178
  /**