@dra2020/district-analytics 5.6.1 → 5.6.2
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/LICENSE +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
package/dist/cli.js
CHANGED
|
@@ -89912,7 +89912,7 @@ function scoreCompetitiveness(rawMarginal, rawOverall) {
|
|
|
89912
89912
|
const mcW = C.marginalCompetitivenessWeight();
|
|
89913
89913
|
const ocW = C.overallCompetitivenessWeight();
|
|
89914
89914
|
// Then combine the results
|
|
89915
|
-
const score = Math.round(((mcW * mcS) + (ocW * ocS)) / (mcW + ocW));
|
|
89915
|
+
const score = ((mcW + ocW) > 0) ? Math.round(((mcW * mcS) + (ocW * ocS)) / (mcW + ocW)) : 0;
|
|
89916
89916
|
return score;
|
|
89917
89917
|
}
|
|
89918
89918
|
exports.scoreCompetitiveness = scoreCompetitiveness;
|