screwdriver-executor-router
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -78,3 +78,3 @@ 'use strict'; | ||
getWeightedExecutor(executors) { | ||
const totalWeight = executors.reduce((prev, curr) => prev + (curr.weightage || 0), 0); | ||
const totalWeight = executors.reduce((prev, curr) => prev + (+curr.weightage || 0), 0); | ||
@@ -89,3 +89,3 @@ if (totalWeight === 0) { | ||
for (let i = 0; i < executors.length; i += 1) { | ||
sum += executors[i].weightage; | ||
sum += parseInt(executors[i].weightage, 10) || 0; | ||
@@ -92,0 +92,0 @@ if (number < sum) return executors[i].name; |
{ | ||
"name": "screwdriver-executor-router", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A generic plugin for routing builds to specified executors", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10889