@dra2020/district-analytics 5.5.0 → 5.5.1
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/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -90177,9 +90177,9 @@ function estMarginalCompetitiveDistricts(Mrange, VfArray) {
|
|
|
90177
90177
|
const maxId = Mrange[C.END];
|
|
90178
90178
|
// Sort the array values, and subset it to those districts
|
|
90179
90179
|
// NOTE - I'm *not* keeping track of the district indexes right now
|
|
90180
|
-
let subsetVfArray = VfArray.sort().slice(minId - 1, maxId);
|
|
90180
|
+
let subsetVfArray = U.deepCopy(VfArray).sort().slice(minId - 1, maxId);
|
|
90181
90181
|
// Est. competitive districts on that array
|
|
90182
|
-
const Md = U.sumArray(subsetVfArray.map(v => estDistrictCompetitiveness(v)));
|
|
90182
|
+
const Md = U.sumArray(subsetVfArray.map((v) => estDistrictCompetitiveness(v)));
|
|
90183
90183
|
return U.trim(Md);
|
|
90184
90184
|
}
|
|
90185
90185
|
exports.estMarginalCompetitiveDistricts = estMarginalCompetitiveDistricts;
|