screwdriver-api 8.0.141 → 8.0.142

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.141",
3
+ "version": "8.0.142",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1232,7 +1232,8 @@ function buildsToRestartFilter(joinPipeline, groupEventBuilds, currentEvent, cur
1232
1232
 
1233
1233
  // Exist build is triggered from current build
1234
1234
  // Prevent double triggering same build object
1235
- if (existBuild.parentBuildId.includes(currentBuild.id)) return null;
1235
+ // parentBuildId can be null for top-of-event builds; nothing to dedupe
1236
+ if (existBuild.parentBuildId && existBuild.parentBuildId.includes(currentBuild.id)) return null;
1236
1237
 
1237
1238
  // Circle back trigger (Remote Join case)
1238
1239
  if (existBuild.eventId === currentEvent.parentEventId) return null;