screwdriver-api 7.0.10 → 7.0.11

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": "7.0.10",
3
+ "version": "7.0.11",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -454,7 +454,8 @@ async function updateParentBuilds({ joinParentBuilds, nextBuild, build }) {
454
454
  );
455
455
 
456
456
  nextBuild.parentBuilds = newParentBuilds;
457
- nextBuild.parentBuildId = Array.from(new Set([build.id, ...(nextBuild.parentBuildId || [])]));
457
+ // nextBuild.parentBuildId may be int or Array, so it needs to be flattened
458
+ nextBuild.parentBuildId = Array.from(new Set([build.id, nextBuild.parentBuildId || []].flat()));
458
459
 
459
460
  // FIXME: Is this needed ? Why not update once in handleNewBuild()
460
461
  return nextBuild.update();